1,2,3차 메뉴가 있다고 가정했을 때
3
차 메뉴를 클릭했을 때 상위의 2차 메뉴가 나타나고,
2 차 메뉴에도 2차 메뉴가 출력되는 코드가 있으면 될 것 같아서
<!--@if($menu_1st['link'])-->{$selected_menu=$key}<!--@end-->
이 렇게 하니깐 (참고로, @menu_1st는 그 두번째 메뉴이고요.) 두번째 메뉴의 $key를 가져올 수 있으면
<!--@if($menu_1st['link'])-->
<span
class="subtitle_{$selected_menu=$key}"></span>
<!--@end-->
레 이아웃에는 이렇게만 작성하고
css 파일에서
.subtitle_1232423 {}
이렇게 키 번호에 맞는 메뉴 갯수대로만 작성하면 아래와 같이 긴 코드는 필요 없지 않을까요 ^^a;;;
물론 이런 위젯이 나온다면 이런 고생 안해도 되겠지만요. ㅠ_ㅠ;
1) 웹미니 스킨에서 서브타이틀을 나타낸 방법
<!-- 왼쪽 2차 메뉴 -->
<!--@if($menu_1st)-->
<div id="lnbWrap">
<!--@if('webtip' == $mid || 'hometip' == $mid || 'windows' == $mid || 'linux' == $mid || 'dreamweaver' == $mid || 'flash' == $mid || 'photoshop' == $mid || 'zeroboard' == $mid || 'html' == $mid || 'javascript' == $mid || 'css' == $mid || 'standard' == $mid || 'accessibility' == $mid || 'etctip' == $mid)-->
<h2 class="tip"><span>팁공유방</span></h2>
<!--@end-->
<!--@if('pds_xe' == $mid || 'pds_level' == $mid || 'pds_zb4' == $mid || 'pds_photoshop' == $mid || 'pds_special' == $mid)-->
<h2 class="pds"><span>자료실</span></h2>
<!--@end-->
<!--@if('csssite' == $mid || 'bestsite' == $mid || 'freesite' == $mid || 'skinsite' == $mid)-->
<h2 class="site"><span>사이트</span></h2>
<!--@end-->
<!--@if('community' == $mid || 'freeboard' == $mid || 'member' == $mid || 'faq' == $mid || 'goodboard' == $mid || 'bestboard' == $mid || 'question' == $mid || 'kin' == $mid || 'flashgame' == $mid || 'admini' == $mid)-->
<h2 class="community"><span>커뮤니티</span></h2>
<!--@end-->
<!--@if('life' == $mid || 'beauty' == $mid || 'food' == $mid || 'movie' == $mid || 'book' == $mid || 'it_science' == $mid || 'earlyadopter' == $mid || 'hobby' == $mid || 'travel' == $mid || 'childcare' == $mid)-->
<h2 class="life"><span>라이프</span></h2>
<!--@end-->
<!--@if('iphone' == $mid)-->
<h2 class="iphone"><span>아이폰</span></h2>
<!--@end-->
2) 이온디 사이트 예전
레이아웃에서 사용했던 방법
{@ $sub_title = array(
'center'=>'center','mhboard'=>'center','notice'=>'center','build'=>'center','feedback'=>'center','about'=>'center','theme'=>'center','sitemap'=>'center','traffic'=>'center','phpinfo'=>'center','trash'=>'center','inside'=>'inside','planner'=>'inside','todo'=>'inside','timetable_2008_2'=>'inside','sig'=>'inside','chat'=>'inside','monologue'=>'inside','me'=>'inside','nick'=>'inside','love'=>'inside','2u'=>'inside','propose'=>'inside','ahj'=>'inside','gallery_main'=>'gallery','favimg'=>'gallery','gallery'=>'gallery','people'=>'gallery','myphoto'=>'gallery','style'=>'gallery','manstyle'=>'gallery','todayimage'=>'gallery','KimYeongAe'=>'gallery','photogallery'=>'gallery','project'=>'project','readability'=>'project','hangeul'=>'project','hanja'=>'project','senario'=>'project','lifelog'=>'project','memobook'=>'project','freeimg'=>'project','tip'=>'tip','webtip'=>'tip','photoshop'=>'tip','css_naming'=>'tip','coding'=>'tip','layout'=>'tip','local_layout'=>'tip','source'=>'tip','colortable'=>'tip','images'=>'tip','icon'=>'tip','font'=>'tip','font_download'=>'tip','xe'=>'tip','xe_main'=>'tip','xe_skin'=>'tip','xe_bug'=>'tip','zb4'=>'tip','xe_idea'=>'tip','pds'=>'tip','cgi'=>'tip','webservice'=>'tip','adsense'=>'tip','jwfn'=>'tip','jwfn_template'=>'tip','jwfn_download'=>'tip','jwfn_qna'=>'tip','jwfn_idea'=>'tip','service'=>'collection','book'=>'collection','movie'=>'collection','poem'=>'collection','nakunpoem'=>'collection','music'=>'collection','musicplayer'=>'collection','mov'=>'collection','cf'=>'collection','ani'=>'collection','handwriting'=>'collection','favicon'=>'collection','harmonica'=>'collection','banner'=>'collection','error404'=>'collection','eng_study'=>'collection','eng_agony'=>'collection','news'=>'collection','eng_sentence'=>'collection','eng_voca'=>'collection','eng_wnr'=>'collection','eng_reading'=>'collection','ebs'=>'collection','ebsradio'=>'collection','business'=>'collection','stock'=>'collection','econote'=>'collection','financial_tech'=>'collection','community'=>'community','bbs'=>'community','qna'=>'community','guestbook'=>'community','scrap'=>'community','question'=>'community','todaycomment'=>'community','link'=>'community','campaign'=>'community','savethedeveloper'=>'community','mynote'=>'mynote','attach'=>'mynote'
);}
<!--@if($sub_title[$mid])-->
<div class='subtitle_{$sub_title[$mid]}'></div>
<!--@end-->