Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
I am trying to create a photographers website. I have a portfolio section which I have set up using folders; portraits, weddings, studio, and commercial. On the portfolio pages *portfolio.php*
I am trying to include an isotype gallery. I have followed the tutorial for reverse related pages to create the gallery and I am trying to get them to display inside the portfolio.php within a masonry gallery using an isotopic filter.

Under the gallery I have created dynamic folders for each category with the structure as follows:

weddings
---getting ready
---ceremony
---portraits
---reception
portraits
---family
---children
---couples
studio
commercial

I would like to have the isotope filter display the sub category if there are images in the gallery.
So for example on a wedding portfolio page if there are images with the sub categories then I want the filter to show the categories at the top of the gallery. However on a studio portfolio page there are no subcategories so I do not need the filter to show.

As it is now, the filter is showing all the subcategories on every portfolio page. Thus I am trying to figure out how to specify that the filter should only show the folders if the portfolio page is linked to the parent folder. So the wedding subcategories would only show on wedding pages and the portrait subcategories only show on portrait pages.
Is this possible?

Here is the code for the filter and gallery so far:

Code: Select all
  <div class="row">   
    <article class="col-md-12 text-center softwhite-bg works-filter-wrap">
     

                      <ul class="works-filter clearfix">
                          <li><a id="all" href="#" data-filter="*" class="active"><span>All</span></a></li>
                           
                        <cms:folders masterpage='gallery.php' hierarchical='1' depth='2'>
                        <cms:if k_level='1'>   
                       <li>   <a href="#" data-filter=".folder-<cms:show k_folder_name/>" title="View all <cms:show k_folder_title />"><span><cms:show k_folder_title/></span></a> </li>   </cms:if>
                       
</cms:folders>
                      </ul>
       

          </article>
  </div>

    <div class="row">
       
     
      <div id="works-container" class="works-container whitegray-bg clearfix">


    <!-- start : works-item -->
   <cms:reverse_related_pages 'portfolio_images' masterpage='gallery.php' >  <div class="works-item works-item-one-third zoom folder-<cms:show k_page_foldername/>">
         
            <img alt="" title="" class="img-responsive" src="<cms:show gg_image />"/>
          <a class="venobox" data-gall="portfolio-gallery" href="<cms:show gg_image />">  </a>
       </div>
       </cms:reverse_related_pages>
     
    <!-- end : works-item -->
        </div>       
      </div>

       


Any ideas would be greatly appreciated. Thank you.
Code: Select all

<cms:reverse_related_pages 'portfolio_images' masterpage='gallery.php' limit='1'> 
     <div class="row">   
         <article class="col-md-12 text-center softwhite-bg works-filter-wrap">
          <ul class="works-filter clearfix">
                          <li><a id="all" href="#" data-filter="*" class="active"><span>All</span></a></li>
                           <cms:folders masterpage='gallery.php'  hierarchical='1' depth='2'>
         <cms:if k_folder_pagecount>   
                 <cms:if k_level='1'>   
                 <li>   <a href="#" data-filter=".folder-<cms:show k_folder_name/>" title="View all <cms:show k_folder_title />"><span><cms:show k_folder_title/></span></a> </li>   
             </cms:if>
                      </cms:if>
                          </cms:folders>
                      </ul>
         </article>
</div>
     </cms:reverse_related_pages>
   
     
      <div class="row">
      <div id="works-container" class="works-container whitegray-bg clearfix">

    <!-- start : works-item -->
   <cms:reverse_related_pages 'portfolio_images' masterpage='gallery.php' > 
       <div class="works-item works-item-one-third zoom folder-<cms:show k_page_foldername/>">
           <img alt="" title="" class="img-responsive" src="<cms:show gg_image />"/>
          <a class="venobox" data-gall="portfolio-gallery" href="<cms:show gg_image />">  </a>
       </div>
       </cms:reverse_related_pages>
     
    <!-- end : works-item -->

        </div>   
      </div>



I have tried adding the reverse related pages tag to the filter but I still cannot get it to work.
As soon as I add any images to any gallery than the filter shows.

Is there a way to specify that the filter only shows if the images are linked to that folder.
2 posts Page 1 of 1