채택완료

서브메뉴 문의요

2017-05-07 (일) 12:41:23 3,440
Copy
<?php for ($i=1; $i < $menu_cnt; $i++) { ?><a href="<?php echo $menu[$i]['href'];?>"<?php echo $menu[$i]['target'];?>><?php echo $menu[$i]['name'];?></a> <?php for($j=0; $j < count($menu[$i]['sub']); $j++) { 	?><a href="<?php echo $menu[$i]['sub'][$j]['href'];?>"<?php echo $menu[$i]['sub'][$j]['target'];?>><?php echo $menu[$i]['sub'][$j]['name'];?></a><?php } ?><?php } ?>

서브메뉴를 관리자설정에서 출력여부 상관없이 서브메뉴가 있으면

무조건 보이게 하려고 하면 어떻게 수정해야 되나요 ??

|

답변 2개

채택된 답변
+20 포인트
2017-05-07 (일) 16:15:53

$sql2 = " select *
                            from {$g5['menu_table']}
                            where me_use = '1'
                              and length(me_code) = '4'
                              and substring(me_code, 1, 2) = '{$row['me_code']}'
                            order by me_order, me_id ";

=> 서브 메뉴 쿼리가 위와 같다면 아래처럼 변경하시면 무조건 나오게 될것입니다. 

$sql2 = " select *
                            from {$g5['menu_table']}
                            where length(me_code) = '4'
                              and substring(me_code, 1, 2) = '{$row['me_code']}'
                            order by me_order, me_id "; 

불러오는 쿼리문에서 출력여부 조건을 찾아서 지우세요~~

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