최근 게시물 누르면 링크1번으로 이동하는 방법 좀...
본문
<article class="paper-edge flexbox">
<?php
for ($i=0; $i<$list_count; $i++) {
$thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $thumb_width, $thumb_height, false, true);
if($thumb['src']) {
$img = $thumb['src'];
} else {
$img = G5_IMG_URL.'/no_img.png';
$thumb['alt'] = '이미지가 없습니다.';
}
$img_content = '<img src="'.$img.'" alt="'.$thumb['alt'].'" >';
echo "<div class='wrap'>";
echo "<div class='edge'>";
echo "<a href='". $list[$i]['href']. "'>". $img_content. "</a>".PHP_EOL;
//echo $img_content;
echo "</div>".PHP_EOL;
// echo "<p>". $list[$i]['subject']. "</p>"; 제목 따오는 부분 주석처리
echo "</div>";
}
if ($list_count == 0) { echo "게시물이 없습니다.";}
?>
</article>
최근 게시물 이미지를 누르면 그 이미지 게시판으로 가는게 아니라 글작성하면서 링크1에 넣은 주소로 이동하려면 어떻게해야할까요.
위는 latest.skin 내용입니다. 저거 고치는거 맞죠? 아마도 저 href 가 나오는 줄을 수정해야할거 같긴한데.
!-->
답변 3
echo "<a href='". $list[$i]['href']. "'>". $img_content. "</a>".PHP_EOL;
위 굵은 글자를 wr_link1 로 바꾸면 됩니다.
href 대신 wr_link1 사용해보세요.
<article class="paper-edge flexbox">
<?php
for ($i=0; $i<$list_count; $i++) {
$thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $thumb_width, $thumb_height, false, true);
if($thumb['src']) {
$img = $thumb['src'];
} else {
$img = G5_IMG_URL.'/no_img.png';
$thumb['alt'] = '이미지가 없습니다.';
}
$img_content = '<img src="'.$img.'" alt="'.$thumb['alt'].'" >';
echo "<div class='wrap'>";
echo "<div class='edge'>";
echo "<a href='". $list[$i]['wr_link1']. "'>". $img_content. "</a>".PHP_EOL;
//echo $img_content;
echo "</div>".PHP_EOL;
// echo "<p>". $list[$i]['subject']. "</p>"; 제목 따오는 부분 주석처리
echo "</div>";
}
if ($list_count == 0) { echo "게시물이 없습니다.";}
?>
</article>