타이틀 표시할때 특정 그룹만 제외시키고 싶어요
본문
위 현재위치표시를 사용중인데 Company 그룹에서는 전부 갤러리로 적용되어 있어서
이부분은 타이틀이 안나오게 적용하고 싶습니다.
현재위치표시는 나오고
타이틀 부분만 안나오게 하고 싶습니다.
<strong><?php echo $position_title; ?></strong><span><?php echo $position_sca?></span>
이 부분만요
조언 부탁드립니다.
<?php
//게시판일때
if($_REQUEST['bo_table']){
$sql = " select * from {$g5['board_table']} where bo_table = '$_REQUEST[bo_table]'";
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++) {
$board_name = $row['bo_subject'];
$sql1 = " select * from {$g5['group_table']} where gr_id = '$row[gr_id]'";
$result1 = sql_query($sql1);
for ($gi=0; $row1=sql_fetch_array($result1); $gi++) { // gi 는 group index
$group_name = $row1['gr_subject'];
}
}
}
//그룹일때
if($_REQUEST['gr_id']){
$sql1 = " select * from {$g5['group_table']} where gr_id = '$_REQUEST[gr_id]'";
$result1 = sql_query($sql1);
for ($gi=0; $row1=sql_fetch_array($result1); $gi++) { // gi 는 group index
$group_name = $row1['gr_subject'];
}
}
//게시판일 때 출력 부분
//echo $group_name." > ".$board_name. " > ".$_REQUEST['sca']; // 그룹 > 게시판 > 카테고리
?>
<link rel="stylesheet" href="<?php echo G5_URL?>/fonts/fonts.css" type="text/css" />
<style>
#tit_js {
font-family:'Nanum Gothic',sans-serif;
font-size:19px;
font-weight:bold;
color:#464646;
}
#position_js {
font-family:'Nanum Gothic',sans-serif;
color:#999;
font-size:11px;
}
</style>
<?php if($group_name){ ?>
<?php
if($group_name){
$position_title = $group_name;
}
if($board_name){
$position_title = $board_name;
}
if($_REQUEST['sca']){
$position_sca = ' | <span style="font-size:9pt;">'.$_REQUEST['sca']."</span>";
}
?>
<div style="height:10px;"></div>
<div id="position_js" style="line-height:22px;" >
<?php
//echo $group_name." > ".$board_name. " > ".$_REQUEST['sca'];
//$position_print = "<strong>현재위치</strong> : ";
$position_print = $position_print."<i class='fa fa-home'></i> Home > ".$group_name;
if($board_name){
$position_print = $position_print." > ".$board_name;
}
if($_REQUEST['sca']){
$position_print = $position_print." > [분류] ".$_REQUEST['sca'];
}
echo $position_print;
?>
</div>
<div style="height:10px; clear:both;"></div>
<div style="height:10px; border-top:0px solid #999;"></div>
<div style="height:10px; clear:both;"></div>
<div id="tit_js" style="padding:0px 0px 10px 0px; "><strong><?php echo $position_title; ?></strong><span><?php echo $position_sca?></span></div>
<div style="height:5px;"><img src="/images/tit_line.jpg"></div>
<? } ?>
답변 2
87번 라인
<div id="tit_js" style="padding:0px 0px 10px 0px; "><strong><?php echo $position_title; ?></strong><span><?php echo $position_sca?></span></div>
를 아래와 같이 변경하세요
<? if($board['gr_id']!='company'){ ?>
<div id="tit_js" style="padding:0px 0px 10px 0px; "><strong><?php echo $position_title; ?></strong><span><?php echo $position_sca?></span></div>
<? } ?>
===========================
게시판소스가 아니였군요. 그룹 아이디를 받아오시려면 $row['gr_id'] 값이 아마 그대로 내려오지 싶은데 그걸 활용하셔도 되겠네요.
!-->!-->참고로 저는 기존 게시판 제목이 표시되는 부분을 아래와 같이 하여, 현재위치를 표시하고 있습니다.
게시판 리스트, 수정페이지, 뷰페이지 부분의 해당 부분을 아래로 교체하면 됩니다. 좀 수작업이 필요하지만,,,
<h2 id="container_title">
현재위치: <a href="<?php echo G5_URL?>">HOME</a>>
<?php echo $group['gr_subject']?>>
<a href="<?php echo G5_BBS_URL?>/board.php?bo_table=<?php echo $board[bo_table]?>"><?php echo $board['bo_subject'] ?></a>
</h2>
답변을 작성하시기 전에 로그인 해주세요.