I have a page that lists the different sections of the page on the right hand side of the page to jump sections easily. The client wants the right-side navigation to be split into 2 sections just for one folder.
I am trying to set up an editable region (radio) that shows up only when the admin is in a specific folder. I then need to detect that folder on the page and split the navigation into the 2 parts with an if statement. I think I have some wires crossed with relations and extended folders. A dropdown shows up in every folder of the masterpage and the only option that displays is the Default page for XXX please change this title..


Original template:
Code: Select all
<?php require_once( 'admin/cms.php' ); ?>
<cms:template title='Menu' order='30' clonable='1' dynamic_folders='1' folder_masterpage='botox_cat.php'>
   <cms:editable name='service_title' label='Service Title' type='text' order='1' />
   <cms:editable name='service_name' label='Service Name' desc='One word without spaces' type='text' order='2' />
   <cms:editable name='service_content' label='Service Content' type='richtext' toolbar='full' order='3' css="<cms:show k_site_link />css/styles.css"  />
   <cms:editable type='relation' name='botox_cat' label='Botox Sub-Categories' masterpage='botox_cat.php' has='one' folder='botox-and-fillers' />
</cms:template>

<cms:if k_is_page>
   <cms:embed 'views/menu/page_view.html' />
   <cms:else />
   <cms:embed 'views/menu/list_view.html' />
</cms:if>

<?php COUCH::invoke(); ?>



The new template for the editable regions for the specific folder:
Code: Select all
<?php require_once( 'admin/cms.php' ); ?>
<cms:template title='Botox Sub-Categories' clonable='1' hidden='1'>
    <cms:editable name="botox_type" label="Botox Type" desc="Select one from these" opt_values='Muscle Relaxers=mr | Dermal Fillers=dm' type='radio' />
</cms:template>

<?php COUCH::invoke(); ?>


Right side navigation on the page:
Code: Select all
<cms:pages masterpage='menu.php'>
                     <cms:if folder='botox-and-fillers'>
                        <!-- /.sidebar Start ./-->
                        <div class="col-lg-3 col-md-3 sidebar">
                           <!-- /.Search ./-->
                           <!-- /.Categoris list start ./-->
                           <div class="ser-cats"> <strong class="stitle2">Muscle Relaxers</strong>
                              <ul>
                                 <cms:pages masterpage='menu.php' folder=k_page_foldername order='asc'>
                                    <li><a data-scroll href="#<cms:show service_name />"><cms:show service_name /></a></li>
                                 </cms:pages>
                              </ul>
                           </div>
                           <div class="ser-cats"> <strong class="stitle2">Dermal Fillers</strong>
                              <ul>
                                 <cms:pages masterpage='menu.php' folder=k_page_foldername order='asc'>
                                    <li><a data-scroll href="#<cms:show service_name />"><cms:show service_name /></a></li>
                                 </cms:pages>
                              </ul>
                           </div>
                           <!-- /.Categoris list End ./-->
                     </cms:if>
                  </cms:pages>