밑에 리스트에 관해서 질문을 드린 사람입니다.
<tr<?php if($_GET['uid']==$content->uid):?> style="background-color:#f7f7f7;"<?php endif?>>
이 코그를 tbody 안에 넣으라는 건지 ? 아니면 어떤 부분을 수정해야하는지 모르겠습니다. tbody에 코드가 하나가 아니여서요
초보여서 잘 모르니 조금만 자세히 설명부탁드려요
<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">
<a href="<?php echo $url->set('uid', $content->uid)->set('mod', 'document')->toString()?>">
<div class="kboard-default-cut-strings">
<?php echo $content->title?>
<?php echo $content->getCommentsCount()?>
<?php if($content->secret):?><img src="<?php echo $skin_path?>/images/icon-lock.png" alt="<?php echo __('Secret', 'kboard')?>"><?php endif?>
<?php if($content->isNew()):?><span class="kboard-default-new-notify">New</span><?php endif?>
</div>
<div class="kboard-mobile-contents">
<span class="contents-item"><img src="<?php echo $skin_path?>/images/icon-user.png" alt="<?php echo __('Author', 'kboard')?>"> <?php echo $content->member_display?></span>
<span class="contents-item"><img src="<?php echo $skin_path?>/images/icon-date.png" alt="<?php echo __('Date', 'kboard')?>"> <?php echo date("Y.m.d", strtotime($content->date))?></span>
<span class="contents-item"><img src="<?php echo $skin_path?>/images/icon-view.png" alt="<?php echo __('Views', 'kboard')?>"> <?php echo $content->view?></span>
</div>
</a>
</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-list-title">
<a href="<?php echo $url->set('uid', $content->uid)->set('mod', 'document')->toString()?>">
<div class="kboard-default-cut-strings">
<?php echo $content->title?>
<?php echo $content->getCommentsCount()?>
<?php if($content->secret):?><img src="<?php echo $skin_path?>/images/icon-lock.png" alt="<?php echo __('Secret', 'kboard')?>"><?php endif?>
<?php if($content->isNew()):?><span class="kboard-default-new-notify">New</span><?php endif?>
</div>
<div class="kboard-mobile-contents">
<span class="contents-item"><img src="<?php echo $skin_path?>/images/icon-user.png" alt="<?php echo __('Author', 'kboard')?>"> <?php echo $content->member_display?></span>
<span class="contents-item"><img src="<?php echo $skin_path?>/images/icon-date.png" alt="<?php echo __('Date', 'kboard')?>"> <?php echo date("Y.m.d", strtotime($content->date))?></span>
<span class="contents-item"><img src="<?php echo $skin_path?>/images/icon-view.png" alt="<?php echo __('Views', 'kboard')?>"> <?php echo $content->view?></span>
</div>
</a>
</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>
아래처럼 해보세요.
소스 그대로 복사해서 사용해보셔도 됩니다 :D
<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">
<a href="<?php echo $url->set('uid', $content->uid)->set('mod', 'document')->toString()?>">
<div class="kboard-default-cut-strings">
<?php echo $content->title?>
<?php echo $content->getCommentsCount()?>
<?php if($content->secret):?><img src="<?php echo $skin_path?>/images/icon-lock.png" alt="<?php echo __('Secret', 'kboard')?>"><?php endif?>
<?php if($content->isNew()):?><span class="kboard-default-new-notify">New</span><?php endif?>
</div>
<div class="kboard-mobile-contents">
<span class="contents-item"><img src="<?php echo $skin_path?>/images/icon-user.png" alt="<?php echo __('Author', 'kboard')?>"> <?php echo $content->member_display?></span>
<span class="contents-item"><img src="<?php echo $skin_path?>/images/icon-date.png" alt="<?php echo __('Date', 'kboard')?>"> <?php echo date("Y.m.d", strtotime($content->date))?></span>
<span class="contents-item"><img src="<?php echo $skin_path?>/images/icon-view.png" alt="<?php echo __('Views', 'kboard')?>"> <?php echo $content->view?></span>
</div>
</a>
</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<?php if($_GET['uid']==$content->uid):?> style="background-color:#f7f7f7;"<?php endif?>>
<td class="kboard-list-uid"><?php echo $list->index()?></td>
<td class="kboard-list-title">
<a href="<?php echo $url->set('uid', $content->uid)->set('mod', 'document')->toString()?>">
<div class="kboard-default-cut-strings">
<?php echo $content->title?>
<?php echo $content->getCommentsCount()?>
<?php if($content->secret):?><img src="<?php echo $skin_path?>/images/icon-lock.png" alt="<?php echo __('Secret', 'kboard')?>"><?php endif?>
<?php if($content->isNew()):?><span class="kboard-default-new-notify">New</span><?php endif?>
</div>
<div class="kboard-mobile-contents">
<span class="contents-item"><img src="<?php echo $skin_path?>/images/icon-user.png" alt="<?php echo __('Author', 'kboard')?>"> <?php echo $content->member_display?></span>
<span class="contents-item"><img src="<?php echo $skin_path?>/images/icon-date.png" alt="<?php echo __('Date', 'kboard')?>"> <?php echo date("Y.m.d", strtotime($content->date))?></span>
<span class="contents-item"><img src="<?php echo $skin_path?>/images/icon-view.png" alt="<?php echo __('Views', 'kboard')?>"> <?php echo $content->view?></span>
</div>
</a>
</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>