테스트 사이트 - 개발 중인 베타 버전입니다

메뉴 변수 설정하는 방법 좀 문의합니다 채택완료

giftst 8년 전 조회 1,997
<li class="swiper-slide"><a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=ev1"

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <?php if ($bo_table=='ev1') { ?> class="gnb_sl"<?php } ?>>홈페이지 </a></li>





&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <li class="swiper-slide"><a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=ev2"

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <?php if ($bo_table=='ev2') { ?> class="gnb_sl"<?php } ?>>SNS </a></li>



이런 식으로된&nbsp; 메뉴 코드인데요



각각의 메뉴에 변수를 설정해서

스크립트에는



initialSlide : <?php echo $menuNumber; ?>



이렇게 하고싶은데요



메뉴에다 변수 설정을 어떻게 해야될까요?

&nbsp;도움 좀 부탁드립니다







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

답변 1개

채택된 답변
+20 포인트
그림자밟기

head.php 파일에다가 메뉴 변수 설정해주시면 될 듯 합니다.

예제

</p><p>if($bo_table) $​menuNumber = $bo_table;</p><p><span style="font-size: 14.6667px;">if($co_id) $</span><span style="font-size: 14.6667px;">​menuNumber = $co_id;</span> </p><p>

또는

</p><p style="font-size: 14.6667px;">if($bo_table == 'ev1') $​menuNumber = 1;</p><p style="font-size: 14.6667px;"><span style="font-size: 14.6667px;">else if($bo_table == 'ev2') $​menuNumber = 2;</span> </p><p style="font-size: 14.6667px;">

로그인 후 평가할 수 있습니다

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

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

로그인