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:
Any ideas would be greatly appreciated. Thank you.
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.