최신글 뷰를 출력할려고 하니 타이틀하고 날짜하고 내용만 나오더라고요..
제가 원하는건 list.php처럼 전체가 다 나오길 원합니다.
번호 / 제목 / 작성자 / 작성일 / 조회 까지 전부요
그래서
----------------------------------------- 원본 latest.php 를 --------------------------------------------
<div id="kboard-default-latest">
<table>
<thead>
<tr>
<th class="kboard-latest-title"><?php echo __('Title', 'kboard')?></th>
<th class="kboard-latest-date"><?php echo __('Date', 'kboard')?></th>
</tr>
</thead>
<tbody>
<?php while($content = $list->hasNext()):?>
<tr>
<td class="kboard-latest-title"><div class="cut_strings"><a href="<?php echo $url->set('uid', $content->uid)->set('mod', 'document')->toStringWithPath($board_url)?>"><?php echo $content->title?></a> <?php echo $content->getCommentsCount()?></div></td>
<td class="kboard-latest-date"><?php echo date("Y.m.d", strtotime($content->date))?></td>
</tr>
<?php endwhile?>
</tbody>
</table>
</div>
----------------------------------- 수정 latest.php 로 변경하였습니다. -----------------------------------------
<div id="kboard-default-list">
<!-- 검색폼 시작 -->
<div class="kboard-header">
<form id="kboard-search-form" method="get" action="<?php echo $url->set('mod', 'list')->toString()?>">
<?php echo $url->set('category1', '')->set('category2', '')->set('pageid', '1')->set('target', '')->set('keyword', '')->set('mod', 'list')->toInput()?>
<?php if($board->use_category == 'yes'):?>
<div class="kboard-category">
<?php if($board->initCategory1()):?>
<select name="category1" onchange="jQuery('#kboard-search-form').submit();">
<option value=""><?php echo __('All', 'kboard')?></option>
<?php while($board->hasNextCategory()):?>
<option value="<?php echo $board->currentCategory()?>"<?php if($_GET['category1'] == $board->currentCategory()):?> selected="selected"<?php endif?>><?php echo $board->currentCategory()?></option>
<?php endwhile?>
</select>
<?php endif?>
<?php if($board->initCategory2()):?>
<select name="category2" onchange="jQuery('#kboard-search-form').submit();">
<option value=""><?php echo __('All', 'kboard')?></option>
<?php while($board->hasNextCategory()):?>
<option value="<?php echo $board->currentCategory()?>"<?php if($_GET['category2'] == $board->currentCategory()):?> selected="selected"<?php endif?>><?php echo $board->currentCategory()?></option>
<?php endwhile?>
</select>
<?php endif?>
</div>
<?php endif?>
<div class="kboard-search">
<select name="target">
<option value=""><?php echo __('All', 'kboard')?></option>
<option value="title"<?php if($_GET['target'] == 'title'):?> selected="selected"<?php endif?>><?php echo __('Title', 'kboard')?></option>
<option value="content"<?php if($_GET['target'] == 'content'):?> selected="selected"<?php endif?>><?php echo __('Content', 'kboard')?></option>
<option value="member_display"<?php if($_GET['target'] == 'member_display'):?> selected="selected"<?php endif?>><?php echo __('Author', 'kboard')?></option>
</select>
<input type="text" name="keyword" value="<?php echo $_GET['keyword']?>">
<button type="submit" class="kboard-default-button-small"><?php echo __('Search', 'kboard')?></button>
</div>
</form>
</div>
<!-- 검색폼 끝 -->
<!-- 리스트 시작 -->
<div class="kboard-list">
<table>
<thead>
<tr>
<td class="kboard-list-uid"><?php echo __('Number', 'kboard')?></td>
<td class="kboard-list-title"><?php echo __('Title', 'kboard')?></td>
<td class="kboard-list-international">품목별</td>
<td class="kboard-list-user"><?php echo __('Author', 'kboard')?></td>
<td class="kboard-list-date"><?php echo __('Date', 'kboard')?></td>
<td class="kboard-list-view"><?php echo __('Views', 'kboard')?></td>
</tr>
</thead>
<tbody>
<?php while($content = $list->hasNextNotice()):?>
<tr class="kboard-list-notice">
<td class="kboard-list-uid"><?php echo __('Notice', 'kboard')?></td>
<td class="kboard-list-title"><div class="cut_strings">
<a href="<?php echo $url->set('uid', $content->uid)->set('mod', 'document')->toString()?>"><?php echo $content->title?></a>
<?php echo $content->getCommentsCount()?>
</div></td>
<td class="kboard-list-international"><?php echo $content->International?></td>
<td class="kboard-list-user"><?php echo $content->member_display?></td>
<td class="kboard-list-date"><?php echo date("Y.m.d", strtotime($content->date))?></td>
<td class="kboard-list-view"><?php echo $content->view?></td>
</tr>
<?php endwhile?>
<?php while($content = $list->hasNext()):?>
<tr>
<td class="kboard-list-uid"><?php echo $list->index()?></td>
<td class="kboard-latest-title"><div class="cut_strings"><a href="<?php echo $url->set('uid', $content->uid)->set('mod', 'document')->toStringWithPath($board_url)?>"><?php echo $content->title?></a> <?php echo $content->getCommentsCount()?></div></td>
<td class="kboard-list-international"><?php echo isset($content->option->international)?$content->option->international:''?></td>
<td class="kboard-list-user"><?php echo $content->member_display?></td>
<td class="kboard-list-date"><?php echo date("Y.m.d", strtotime($content->date))?></td>
<td class="kboard-list-view"><?php echo $content->view?></td>
</tr>
<?php $boardBuilder->builderReply($content->uid)?>
<?php endwhile?>
</tbody>
</table>
</div>
<!-- 페이징 시작 -->
<div class="kboard-pagination">
<ul class="kboard-pagination-pages">
<?php echo kboard_pagination($list->page, $list->total, $list->rpp)?>
</ul>
</div>
<!-- 페이징 끝 -->
</div>
--------------------------------------------------------- 문제가 생김 -----------------------------------------------------
출력은 제대로 잘나옵니다.
그런데 문제는 kboard-pagination 에서 문제가 생겼습니다.
아래 번호가 나오긴하는데 1,2,3,4 어떤 숫자를 눓러도 넘어가지지 않습니다.
어떻게 해결해야 할까요??
링크는 아래와 같습니다.
지금은 동작되는것 같군요?
게시판 리스트가 그대로 나와야 한다면, 최신글이 아니라 게시판을 그냥 숏코드 등으로 추가하셔도 되는게 아닌가요? ㅎㅎ
그리고 게시글 링크 주소도 변경을 해주셔야 할 듯합니다.
list.php 파일에서는 아래의 링크 주소를 사용합니다.
<a href="<?php echo $url->set('uid', $content->uid)->set('mod', 'document')->toString()?>"><?php echo $content->title?></a>
latest.php 파일에서는 아래의 링크 주소를 사용하고 있습니다.
<a href="<?php echo $url->set('uid', $content->uid)->set('mod', 'document')->toStringWithPath($board_url)?>"><?php echo $content->title?></a>
제가 잠깐 작업좀 하느라 빼버렸었는데 다시 한번봐주세요
<!-- 페이징 시작 -->
<div class="kboard-pagination">
<ul class="kboard-pagination-pages">
<?php echo kboard_pagination($list->page, $list->total, $list->rpp)?>
</ul>
</div>
<!-- 페이징 끝 -->
여기 부분만 수정하면될것같은데...