팁게시판
좌측 날개
우측 날개

특정 게시판 카테고리 메인에 링크 만들기

작성자 정보

  • 관리자 작성
  • 작성일

컨텐츠 정보

본문

free게시판의 카테고리를 해당 게시판 리스트가 아닌 곳(메인, 뷰페이지 등)에서 링크 만들기 입니다

bbs/list.php상단의 카테고리 링크 생성 코드를 이용하면 됩니다

 

  <?php
  $bo_tablek = 'free';
   $write_table=$g5['write_prefix'].$bo_tablek;
   $board=sql_fetch("select bo_category_list from {$g5['board_table']} where bo_table='$bo_tablek' ");

    $category_href = get_pretty_url($bo_tablek);
    $category_option ="<ul id='bo_cate'><li><a href='{$category_href}'>전체</a></li>";

//전체 링크가 필요 없으면 디음행 주석 삭제

//    $category_option ="<ul id='bo_cate'>";

 

    $categories = explode('|', $board['bo_category_list']); 
    for ($i=0; $i<count($categories); $i++) {
        $category = trim($categories[$i]);
        if ($category=='') continue;
        $category_option .= '<li><a href="'.(get_pretty_url($bo_tablek,'','sca='.urlencode($category))).'">'.$category.'</a></li>';
    }
  $category_option .="</ul>";
  ?>
  <style>
#bo_cate ul:after {display:block;visibility:hidden;clear:both;content:""}
#bo_cate li {display:inline-block;padding:2px}
#bo_cate a {display:block;line-height:25px;padding:3px 15px;border-radius:7px;border:1px solid #d6e9ff;color:#6794d3;font-weight:bold;}
#bo_cate a:hover {text-decoration:none;background:red;color:#fff}
</style>
<?php echo $category_option;?> 

관련자료

댓글 0
등록된 댓글이 없습니다.

최근글


  • 글이 없습니다.

새댓글


  • 댓글이 없습니다.
알림 0