Hi there,
I am using the Gallery module and currently all galleries are set up as subgalleries of the main {gallery}. However, I now need to add a subgallery which I do not want to display on the front end as part of the main {gallery} directory. Is it possible to exclude a subgallery? I've tried to find instructions on how to do this and even tried checking the gallery id but it seems it checks the gallery id of the current gallery, rather than the sub gallery.
Any help much appreciated.
Many thanks
Exclude Sub Gallery [SOLVED]
Exclude Sub Gallery [SOLVED]
Last edited by JM6891 on Mon Feb 10, 2014 11:03 am, edited 1 time in total.
Re: Exclude Sub Gallery
Something like this?
http://forum.cmsmadesimple.org/viewtopi ... ub+gallery
http://forum.cmsmadesimple.org/viewtopi ... ub+gallery
Re: Exclude Sub Gallery
Hi thank you for your reply. I actually worked around it using:
This is a manual edit but it works for what I need. It basically checks the sub gallery is not equal to the full url inserted.
Code: Select all
{foreach from=$images item=image}
{if ($image->file) != 'http://www.domain.co.uk/gallery/subgallery/59.html'}
<div class="img">
{if $image->isdir}
<a href="{$image->file}" title="{$image->title}"><img src="{$image->thumb}" alt="{$image->title}" /></a><br />
{$image->title}
{else}
<a href="{$image->file}" title="{$image->title}" rel="lightbox[gallery]"><img src="{$image->thumb}" alt="{$image->title}" /></a>
{/if}
</div>
{/if}
{/foreach}Re: Exclude Sub Gallery [SOLVED]
Although 'solved' I'd like to comment:
I think a solution with hardcoded url (or whatever) should be prevented if possible.
Why don't you add an extra checkbox field (Gallery -> Field definitions tab) to the Gallery? It would be reusable for any other sub gallery added in the future. And if something changes (like domain name for example) it continues to work for you.
I think a solution with hardcoded url (or whatever) should be prevented if possible.
Why don't you add an extra checkbox field (Gallery -> Field definitions tab) to the Gallery? It would be reusable for any other sub gallery added in the future. And if something changes (like domain name for example) it continues to work for you.
Re: Exclude Sub Gallery [SOLVED]
thank you for your reply! I completely agree! A hard coded option should be avoided, however in this instance time was against me, though I do plan to go back and make it more dynamic when I have a bit more time... thank you for the tip! this will be handy indeed and I'll update this thread with a better solution when I've got one working!


