채택완료

링크걸기

2020-09-08 (화) 22:32:20 3,744

안녕하세요?

궁금한점이 있어서 글올립니다

아래 소스에 제목에만 링크가 걸려 있는데요

행전체에 링크를 걸려면 어떻게 해야 하는지 궁금합니다

조언 부탁드립니다

<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개 / 댓글 4개

채택된 답변
+20 포인트
Copy
<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>

답변에 대한 댓글 1개

감사합니다
많은 도움이 되었습니다
2020-09-09 (수) 02:13:18

      echo "<a href=\"".$list[$i]['href']."\" class=\"pic_li_tit\"> "; 이놈을 위로 보내세요 

답변에 대한 댓글 3개

답변 감사합니다
위치를 옮겨봤는데 어딘지를 정확하게 모르겠습니다 ㅠㅠ
저기요
그 위치를 바꾸라는 대답은 저도 할것 같네요
더 자세한 내용을 몰라서 그렇지
질문의 요지가 좀 명확하게 얘기 해주면 알것같았는데.. 암튼 밑에분 글 참고하세요..

답변을 작성하려면 로그인이 필요합니다.