Forum for discussing general topics related to Couch.
2 posts Page 1 of 1
Code: Select all
  <div class="tab-content bro-tab-cont-master">
                <cms:folders masterpage='products.php' hierarchical='1' paginate = '1' limit='1000' >
                <cms:if k_count eq active_tab ><cms:set active_class = 'active' /><cms:else /><cms:set active_class = '' /></cms:if>
              <div class="tab-pane bro-panpaan <cms:show active_class />" id="<cms:show k_folder_name />" role="tabpanel">
                <div class="image-col">
                  <img src="<cms:show k_folder_image />">
                </div>
                <div class="li-col">
                    <cms:pages masterpage='products.php' folder=k_folder_name  >
                      <li>
                        <a href="<cms:show k_page_link />"  data-toggle="modal" data-target="#bro-modal" class="productlinka"><cms:show k_page_title /></a>
                        <div class="clearfix"></div>
                      <div class="hover-gffimg"><img width='100%' src="<cms:show products_hoverimg />"></div>
                  </li>
                  </cms:pages>
                </div>
              </div>
              <!--modal-->
              </cms:folders>
            </div>


Now I have this snippet working properly but the thing is when the page is loaded it shows not the list of the tab that is active. It shows the list from the last folder, what I don't know how to do is show the list of pages that is active on the tabs when the page is loaded.

can someone please set me on the right path?
From what I could figure out seeing the code, suppose you have four folders, the code should output four 'panes' (one for each folder) each listing pages of that particular folder.
Whichever pane is active would be visible thus showing the pages of that folder.

If that is not how things appear, please do a view-source to see if the generated HTML matches the above description (you should have four panes each having its own set of pages).

So perhaps the issue here is just to set the correct pane as active.

Your code uses a variable named "active_tab" to do that -
<cms:if k_count eq active_tab ><cms:set active_class = 'active' /><cms:else /><cms:set active_class = '' /></cms:if>
However, I don't see that variable being set anywhere. If that is the case, none of the panes would be set as active.

Please review your code and see how the "active_tab" variable was supposed to get its value.

Hope it helps.
2 posts Page 1 of 1