링크걸기
본문
안녕하세요?
궁금한점이 있어서 글올립니다
아래 소스에 제목에만 링크가 걸려 있는데요
행전체에 링크를 걸려면 어떻게 해야 하는지 궁금합니다
조언 부탁드립니다
<div class="pic_li_lt">
<h2 class="lat_title"><a href="<?php echo get_pretty_url($bo_table); ?>"><?php echo $bo_subject ?></a></h2>
<a href="<?php echo get_pretty_url($bo_table); ?>" class="lt_more"><span class="sound_only"><?php echo $bo_subject ?></span>+</a>
<table id="t" cellpadding="0" cellspacing="0">
<tr>
<?php
for ($i=0; $i<$list_count; $i++) {
$img_link_html = '';
if( $i === 0 ) {
$thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $thumb_width, $thumb_height, false, true);
}
?>
<td width="70%" cellpadding="0">
<?php echo $img_link_html; ?>
<?php
if ($list[$i]['icon_secret']) echo "<i class=\"fa fa-lock\" aria-hidden=\"true\"></i><span class=\"sound_only\">비밀글</span> ";
echo "<a href=\"".$list[$i]['href']."\" class=\"pic_li_tit\"> ";
if ($list[$i]['is_notice'])
echo "<strong>".$list[$i]['subject']."</strong>";
else
echo $list[$i]['subject'];
?>
</td>
<td><?php echo $list[$i]['name'] ?></td>
<td width="15%"><?php echo $list[$i]['datetime2'] ?></td>
</tr>
<?php } ?>
</table>
</div>
답변 2
<div class="pic_li_lt">
<h2 class="lat_title"><a href="<?php echo get_pretty_url($bo_table); ?>"><?php echo $bo_subject ?></a></h2>
<a href="<?php echo get_pretty_url($bo_table); ?>" class="lt_more"><span class="sound_only"><?php echo $bo_subject ?></span>+</a>
<table id="t" cellpadding="0" cellspacing="0">
<?php
for ($i = 0; $i < $list_count; $i++) {
$img_link_html = '';
if ($i === 0) {
$thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $thumb_width, $thumb_height, false, true);
}
?>
<tr style="cursor: pointer;" onclick="location.href='<?=$list[$i]['href']?>'">
<td width="70%" cellpadding="0">
<?php echo $img_link_html; ?>
<?php
if ($list[$i]['icon_secret']) echo "<i class=\"fa fa-lock\" aria-hidden=\"true\"></i><span class=\"sound_only\">비밀글</span> ";
if ($list[$i]['is_notice'])
echo "<strong>" . $list[$i]['subject'] . "</strong>";
else
echo $list[$i]['subject'];
?>
</td>
<td><?php echo $list[$i]['name'] ?></td>
<td width="15%"><?php echo $list[$i]['datetime2'] ?></td>
</tr>
<?php } ?>
</table>
</div>
echo "<a href=\"".$list[$i]['href']."\" class=\"pic_li_tit\"> "; 이놈을 위로 보내세요