Rhymix(XpressEngine) Tips

레이아웃-메뉴-포털메뉴(멀티메뉴)

레이아웃 1개에 여러개의 메뉴를 등록하는 것을 포털메뉴 혹은 멀티메뉴라고 정의한다.

 기본메뉴(main_menu)의 경우 기본적인 레이아웃과 동일한 사용법이다.

포털메뉴(멀티메뉴) 사용시

portal_menu1, portal_menu2, portal_menu3, portal_menu4, portal_menu5

이렇게 하나의 레이아웃에 5개의 사이트맵 메뉴를 등록해서 사용 가능하다.

 

1. 상단 글로벌네비게이션바 소스코드

<div class="gnb_wrap">
   <nav class="gnb">
      <!--@if($layout_info->use_gnb == 'Y')-->
      <ul>
         {@$i=0;}
         <li loop="$portal_menu1->list => $key1, $val1" cond="$i=='0'" class="depth1"><a href="{$val1['href']}">{$val1['link']}</a>
            <!--
            기본 메뉴 선택된 메뉴 출력하는 소스(2016.02.20)
            -->
            <div class="depth2_wrap">
               <div class="container">
                  <div class="row">
                     <div class="depth2_title_wrap">
                        <h2 class="depth2_title">{$val1['link']}
                           <span class="desc">{$val1['desc']}</span>
                        </h2>
                        <ul class="subquickmenu">
                           <li loop="$sqn1->list => $key1, $val1"><a href="{$val1['href']}">{$val1['text']}</a></li>
                           <!--<li>포트폴리오</li>-->
                           <!--<li>최근 프로젝트</li>-->
                           <!--<li>채용공고</li>-->
                        </ul>
                     </div>
                     <ul class="depth2">
                        <li loop="$portal_menu1->list => $key1, $val1" cond="$val1['list']">
                           <dl>
                              <dt><a href="{$val1['href']}">{$val1['link']}</a></dt>
                              <dd loop="$val1['list'] => $key2, $val2">
                                 <a href="{$val2['href']}" target="_blank"|cond="$val2['open_window'] == 'Y'">{$val2['link']} </a><span class="m-more <!--@if($val2['expand']=='Y')-->on<!--@end-->" cond="$val2['list']"></span>
                                 <ol class="depth3 <!--@if($val2['expand']=='Y')-->open<!--@end-->" cond="$val2['list']"><li loop="$val2['list'] => $key3, $val3"><a href="{$val3['href']}" target="_blank"|cond="$val2['open_window'] == 'Y'">- {$val3['link']}</a></li></ol>
                              </dd>
                           </dl>
                        </li>
                     </ul>
                  </div>
               </div>
            </div>
            {@$i++;}
         </li>
         {@$i=0;}
         <li loop="$portal_menu2->list => $key1, $val1" cond="$i=='0'" class="depth1"><a href="{$val1['href']}">{$val1['link']}</a>
            <div class="depth2_wrap">
               <div class="container">
                  <div class="row">
                     <div class="depth2_title_wrap">
                        <h2 class="depth2_title">{$val1['link']}
                           <span class="desc">{$val1['desc']}</span>
                        </h2>
                        <ul class="subquickmenu">
                           <li loop="$sqn2->list => $key1, $val1"><a href="{$val1['href']}">{$val1['text']}</a></li>
                        </ul>
                     </div>

                     <ul class="depth2">
                        <li loop="$portal_menu2->list => $key1, $val1" cond="$val1['list']">
                           <dl>
                              <dt><a href="{$val1['href']}">{$val1['link']}</a></dt>
                              <dd loop="$val1['list'] => $key2, $val2">
                                 <a href="{$val2['href']}" target="_blank"|cond="$val2['open_window'] == 'Y'">{$val2['link']} </a><span class="m-more <!--@if($val2['expand']=='Y')-->on<!--@end-->" cond="$val2['list']"></span>
                                 <ol class="depth3 <!--@if($val2['expand']=='Y')-->open<!--@end-->" cond="$val2['list']"><li loop="$val2['list'] => $key3, $val3"><a href="{$val3['href']}" target="_blank"|cond="$val2['open_window'] == 'Y'">- {$val3['link']}</a></li></ol>
                              </dd>
                           </dl>
                        </li>
                     </ul>
                  </div>

               </div>
            </div>
            {@$i++;}
         </li>


         {@$i=0;}<li loop="$portal_menu3->list => $key1, $val1" cond="$i=='0'" class="depth1"><a href="{$val1['href']}">{$val1['link']}</a><div class="depth2_wrap"><div class="container"><div class="row"><div class="depth2_title_wrap"><h2 class="depth2_title">{$val1['link']}<span class="desc">{$val1['desc']}</span></h2><ul class="subquickmenu"><li loop="$sqn3->list => $key1, $val1"><a href="{$val1['href']}">{$val1['text']}</a></li></ul></div><ul class="depth2"><li loop="$portal_menu3->list => $key1, $val1"><dl><dt><a href="{$val1['href']}">{$val1['link']}</a></dt><dd loop="$val1['list'] => $key2, $val2">
         <a href="{$val2['href']}" target="_blank"|cond="$val2['open_window'] == 'Y'">{$val2['link']} </a><span class="m-more <!--@if($val2['expand']=='Y')-->on<!--@end-->" cond="$val2['list']"></span>
         <ol class="depth3 <!--@if($val2['expand']=='Y')-->open<!--@end-->" cond="$val2['list']"><li loop="$val2['list'] => $key3, $val3"><a href="{$val3['href']}" target="_blank"|cond="$val2['open_window'] == 'Y'">- {$val3['link']}</a></li></ol>
      </dd></dl></li></ul></div>{@$i++;}</div></div></li>
         {@$i=0;}<li loop="$portal_menu4->list => $key1, $val1" cond="$i=='0'" class="depth1"><a href="{$val1['href']}">{$val1['link']}</a><div class="depth2_wrap"><div class="container"><div class="row"><div class="depth2_title_wrap"><h2 class="depth2_title">{$val1['link']}<span class="desc">{$val1['desc']}</span></h2><ul class="subquickmenu"><li loop="$sqn4->list => $key1, $val1"><a href="{$val1['href']}">{$val1['text']}</a></li></ul></div><ul class="depth2"><li loop="$portal_menu4->list => $key1, $val1"><dl><dt><a href="{$val1['href']}">{$val1['link']}</a></dt><dd loop="$val1['list'] => $key2, $val2">
         <a href="{$val2['href']}" target="_blank"|cond="$val2['open_window'] == 'Y'">{$val2['link']} </a><span class="m-more <!--@if($val2['expand']=='Y')-->on<!--@end-->" cond="$val2['list']"></span>
         <ol class="depth3 <!--@if($val2['expand']=='Y')-->open<!--@end-->" cond="$val2['list']"><li loop="$val2['list'] => $key3, $val3"><a href="{$val3['href']}" target="_blank"|cond="$val2['open_window'] == 'Y'">- {$val3['link']}</a></li></ol>
      </dd></dl></li></ul></div>{@$i++;}</div></div></li>
         {@$i=0;}
         <li loop="$portal_menu5->list => $key1, $val1" cond="$i=='0'" class="depth1"><a href="{$val1['href']}">{$val1['link']}</a>
            <div class="depth2_wrap">
               <div class="container">
                  <div class="row">
                     <div class="depth2_title_wrap">
                        <h2 class="depth2_title">{$val1['link']}<span class="desc">{$val1['desc']}</span></h2>
                        <ul class="subquickmenu"><li loop="$sqn5->list => $key1, $val1"><a href="{$val1['href']}">{$val1['text']}</a></li></ul>
                     </div>
                     <ul class="depth2"><li loop="$portal_menu5->list => $key1, $val1">
                        <dl>
                           <dt><a href="{$val1['href']}">{$val1['link']}</a></dt>
                           <dd loop="$val1['list'] => $key2, $val2">
                              <a href="{$val2['href']}" target="_blank"|cond="$val2['open_window'] == 'Y'">{$val2['link']} </a><span class="m-more <!--@if($val2['expand']=='Y')-->on<!--@end-->" cond="$val2['list']"></span>
                              <ol class="depth3 <!--@if($val2['expand']=='Y')-->open<!--@end-->" cond="$val2['list']"><li loop="$val2['list'] => $key3, $val3"><a href="{$val3['href']}" target="_blank"|cond="$val2['open_window'] == 'Y'">- {$val3['link']}</a></li></ol>
                           </dd>
                        </dl></li>
                     </ul>{@$i++;}
                     <div class="depth2_ad">
                        <!--
                        <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
                        <ins class="adsbygoogle"
                            style="display:block"
                            data-ad-format="autorelaxed"
                            data-ad-client="ca-pub-7200623708996327"
                            data-ad-slot="2675920266"></ins>
                        <script>
                           (adsbygoogle = window.adsbygoogle || []).push({});
                        </script>
                        -->

                     </div>
                  </div>
               </div>
            </div>
         </li>
         <!--
         <li><a href="#">이온디</a></li>
         <li><a href="#">Open CMS</a></li>
         <li><a href="#">웹디벨로퍼</a></li>-->
         <!--
         <li>{@ $_idx=0;}<block loop="$portal_menu1->list => $key1, $val1"><a href="{$val1['href']}" cond="$_idx=='0'">1{$val1['link']}</a>{@ $_idx++;}</block></li>
         {@ $_idx=0;}<li loop="$portal_menu2->list => $key1, $val1" cond="$_idx=='0'"><a href="{$val1['href']}">2{$val1['link']}</a>{@ $_idx++;}</li>
         {@ $_idx=0;}<li loop="$portal_menu3->list => $key1, $val1" cond="$portal_menu3->list && $_idx=='0'"><a href="{$val1['href']}">3{$val1['link']}</a>{@ $_idx++;}</li>
         -->
         <!--
         {@ $_idx=0;}<li cond="$portal_menu3->list" loop="$portal_menu3->list => $key1, $val1"><a href="{$val1['href']}">{$val1['link']}</a></li>
         {@ $_idx=0;}<li cond="$portal_menu4->list" loop="$portal_menu4->list => $key1, $val1"><a href="{$val1['href']}">{$val1['link']}</a></li>
         {@ $_idx=0;}<li cond="$portal_menu5->list" loop="$portal_menu5->list => $key1, $val1"><a href="{$val1['href']}">{$val1['link']}</a></li>
         -->
      </ul>
      <!--@else-->
      <ul>
         <li loop="$main_menu->list => $key1, $val1" class="depth1"><a href="{$val1['href']}" target="_blank"|cond="$val1['open_window'] == 'Y'">{$val1['link']}</a>
            <block cond="$val1['selected']">{@ $_selected_menu = $val1}</block>
            <div class="depth2_wrap">
               <div class="container">
                  <ul cond="$val1['list']" class="depth2">
                     <li loop="$val1['list'] => $key2, $val2" class="more"|cond="$val2['list']">
                        <dl>
                           <dt><a href="{$val2['href']}" target="_blank"|cond="$val2['open_window'] == 'Y'">{$val2['link']}</a></dt>
                           <dd loop="$val2['list'] => $key3, $val3"><a href="{$val3['href']}" target="_blank"|cond="$val3['open_window'] == 'Y'">{$val3['link']}</a></dd>
                        </dl>
                     </li>
                  </ul>
               </div>
            </div>
         </li>
      </ul>
      <!--@end-->
   </nav>
</div>

 

2. 사이드바 소스코드

<div class="lnb_head">
   <!--@if($layout_info->use_gnb == 'Y')-->
   <block loop="$portal_menu1->list => $key1, $val1" cond="$val1['selected']"><a href="{$val1['href']}">{$val1['link']}</a></block>
   <block loop="$portal_menu2->list => $key1, $val1" cond="$val1['selected']"><a href="{$val1['href']}">{$val1['link']}</a></block>
   <block loop="$portal_menu3->list => $key1, $val1" cond="$val1['selected']"><a href="{$val1['href']}">{$val1['link']}</a></block>
   <block loop="$portal_menu4->list => $key1, $val1" cond="$val1['selected']"><a href="{$val1['href']}">{$val1['link']}</a></block>
   <block loop="$portal_menu5->list => $key1, $val1" cond="$val1['selected']"><a href="{$val1['href']}">{$val1['link']}</a></block>
   <!--@else-->
   <block loop="$main_menu->list => $key1, $val1" cond="$val1['selected']">{$val1['link']}</block>
   <!--@end-->
</div>
<div class="lnb_box">
   <!--@if($layout_info->use_gnb == 'Y')-->
   <block loop="$portal_menu1->list => $key1, $val1" cond="$val1['selected']">
      <ul>
         <li loop="$val1['list'] => $key2, $val2"><a href="{$val2['href']}" class="on"|cond="$val2['selected']">{$val2['link']}</a>
            <ul cond="$val2['list']">
               <li loop="$val2['list'] => $key3, $val3"><a href="{$val3['href']}" class="on"|cond="$val3['selected']">{$val3['link']}</a></li>
            </ul>
         </li>
      </ul>
   </block>
   <block loop="$portal_menu2->list => $key1, $val1" cond="$val1['selected']">
      <ul>
         <li loop="$val1['list'] => $key2, $val2"><a href="{$val2['href']}" class="on"|cond="$val2['selected']">{$val2['link']}</a>
            <ul cond="$val2['list']">
               <li loop="$val2['list'] => $key3, $val3"><a href="{$val3['href']}" class="on"|cond="$val3['selected']">{$val3['link']}</a></li>
            </ul>
         </li>
      </ul>
   </block>
   <block loop="$portal_menu3->list => $key1, $val1" cond="$val1['selected']">
      <ul>
         <li loop="$val1['list'] => $key2, $val2"><a href="{$val2['href']}" class="on"|cond="$val2['selected']">{$val2['link']}</a>
            <ul cond="$val2['list']">
               <li loop="$val2['list'] => $key3, $val3"><a href="{$val3['href']}" class="on"|cond="$val3['selected']">{$val3['link']}</a></li>
            </ul>
         </li>
      </ul>
   </block>
   <block loop="$portal_menu4->list => $key1, $val1" cond="$val1['selected']">
      <ul>
         <li loop="$val1['list'] => $key2, $val2"><a href="{$val2['href']}" class="on"|cond="$val2['selected']">{$val2['link']}</a>
            <ul cond="$val2['list']">
               <li loop="$val2['list'] => $key3, $val3"><a href="{$val3['href']}" class="on"|cond="$val3['selected']">{$val3['link']}</a></li>
            </ul>
         </li>
      </ul>
   </block>
   <block loop="$portal_menu5->list => $key1, $val1" cond="$val1['selected']">
      <ul>
         <li loop="$val1['list'] => $key2, $val2"><a href="{$val2['href']}" class="on"|cond="$val2['selected']">{$val2['link']}</a>
            <ul cond="$val2['list']">
               <li loop="$val2['list'] => $key3, $val3"><a href="{$val3['href']}" class="on"|cond="$val3['selected']">{$val3['link']}</a></li>
            </ul>
         </li>
      </ul>
   </block>
   <!--@else-->
   <block loop="$main_menu->list => $key1, $val1" cond="$val1['selected']">
      <ul>
         <li loop="$val1['list'] => $key2, $val2"><a href="{$val2['href']}" class="on"|cond="$val2['selected']">{$val2['link']}</a>
            <ul cond="$val2['list']">
               <li loop="$val2['list'] => $key3, $val3"><a href="{$val3['href']}" class="on"|cond="$val3['selected']">{$val3['link']}</a></li>
            </ul>
         </li>
      </ul>
   </block>
   <!--@end-->


</div>

댓글

댓글 본문
graphittie 자세히 보기