게시판 하나를 만들고 최신글을 추가하는데
탭처럼 만들고 싶어서
전체카테고리, 카테고리1, 카테고리2 이런식으로 최신글이 나눠서 보여지게 하고싶습니다!
엘리멘터 단축코드를 이용해서 한게시판의 최신글숏코드를 여러번 사용하여 카테고리를 분리해서 보여지게 하는 방법이 있을까요?
아니면 다른 현명한 현실적인 방법이 있을까요?
skin/defult/latest.php
<div id="kboard-default-latest">
<table>
<thead>
<tr>
<th class="kboard-latest-category1"><?php echo __('Category', 'kboard')?>1</th>
<th class="kboard-latest-category2"><?php echo __('Category', 'kboard')?>2</th>
<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-category1"><span class="category-style"><?php echo $content->category1?></span></td>
<td class="kboard-latest-category1">
<?php if($content->category1 == '카테고리1'):?><span class="kboard-cat-category" style="background-color: #F992AF;">카테고리1</span><?php endif?>
<?php if($content->category1 == '카테고리2'):?><span class="kboard-cat-category" style="background-color:#70C4E0;">카테고리2</span><?php endif?>
<?php if($content->category1 == '카테고리3'):?><span class="kboard-cat-category" style="background-color:#B6C2FC;">카테고리3</span><?php endif?>
<?php if($content->category1 == '카테고리4'):?><span class="kboard-cat-category" style="background-color:#FBD371;">카테고리4</span><?php endif?>
</td>
<td class="kboard-latest-category2"><?php echo $content->category2?></td>
<td class="kboard-latest-title">
<a href="<?php echo $url->set('uid', $content->uid)->set('mod', 'document')->toStringWithPath($board_url)?>">
<div class="kboard-default-cut-strings">
<?php if($content->isNew()):?><span class="kboard-default-new-notify">N</span><?php endif?>
<?php if($content->secret):?><img src="<?php echo $skin_path?>/images/icon-lock.png" alt="<?php echo __('Secret', 'kboard')?>"><?php endif?>
<?php echo $content->title?>
<span class="kboard-comments-count"><?php echo $content->getCommentsCount()?></span>
</div>
</a>
</td>
<td class="kboard-latest-date"><?php echo $content->getDate()?></td>
</tr>
<?php endwhile?>
</tbody>
</table>
</div>
안녕하세요~^^
아래 참고할만한 링크를 남겨드릴테니
참고 후 코드를 수정해보시겠어요?
https://www.cosmosfarm.com/threads/document/47807
고맙습니다.