Gallery module: show all subgalleries' content on one page

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
uniqu3

Re: Gallery module: show all subgalleries' content on one pa

Post by uniqu3 »

As far i know Gallery doesn't support something like this.
applejack
Power Poster
Power Poster
Posts: 1014
Joined: Fri Mar 30, 2007 2:28 am

Re: Gallery module: show all subgalleries' content on one pa

Post by applejack »

You will probably have to write a UDT which cycles through all the sub directories of Gallery and then reads the name of each sub folder and passes that back to the Gallery smarty call.
uniqu3

Re: Gallery module: show all subgalleries' content on one pa

Post by uniqu3 »

Actually yesterday i was in need of something similar (thx to Nicmare for the idea), well displaying one image for each gallery but opening all in fancybox, but idea and workflow should be the same for your task.

Hope you will get the point:

Code: Select all

{if $image->isdir}
   {assign var='gallery_call' value="`$maindir`/`$image->filename`"}{* assign name of gallery and Gallery directory *}
       {Gallery dir=$gallery_call template='sub_gallery'} {* create a template for thumbnails and call another Gallery with assigned path *}
        {$image->filedate|cms_date_format:'%b %d, %Y'}
        {$gallerytitle}
{/if}
dikomix
Forum Members
Forum Members
Posts: 10
Joined: Sat Jul 09, 2011 8:23 am

Re: Gallery module: show all subgalleries' content on one pa

Post by dikomix »

Hello,
I try you solution, but when I copy to website, site is white and no CSS style working.

My template:

Code: Select all

<div class="gallery">
{if !empty($module_message)}<h4>{$module_message|escape}</h4>{/if}
{if !empty($gallerytitle)}<h3>{$gallerytitle}</h3>{/if}
{if !empty($gallerycomment)}<div class="gallerycomment">{$gallerycomment}</div>{/if}
{if !$hideparentlink && !empty($parentlink)}<div class="parentlink">{$parentlink}</div>{/if}
{foreach from=$images item=image}
	<div class="img">
{if $image->isdir}
   {assign var='gallery_call' value="Galerie/Gallery"}{* assign name of gallery and Gallery directory *}
       {Gallery dir=$gallery_call template='sub_gallery'}
        {$image->filedate|cms_date_format:'%b %d, %Y'}
        {$gallerytitle}
{/if}
	</div>
{/foreach}

<div class="galleryclear">&nbsp;</div>
</div>
what have I bad?
uniqu3

Re: Gallery module: show all subgalleries' content on one pa

Post by uniqu3 »

Is there any error? Turn debug mode on to see errors.
I don't think this would be correct Gallery path "Galerie/Gallery".
Did you also create a template named sub_gallery?
dikomix
Forum Members
Forum Members
Posts: 10
Joined: Sat Jul 09, 2011 8:23 am

Re: Gallery module: show all subgalleries' content on one pa

Post by dikomix »

i create the sub_gallery template and copy your code to site, and css working, but pictures and gallery look bad. You can look in:
http://www.dp2.cz/new/index.php?page=galerie

I set the main gallery with template "sub_gallery". Subgallery with template "fanbox".

Maybe I dont understend...
I mus have new template "sub_gallery" with that code, and use it on main or subgallery?

And is possible add hyperlink to view solo subgallery?
uniqu3

Re: Gallery module: show all subgalleries' content on one pa

Post by uniqu3 »

You need to call main Gallery that should list all galleries with Tempalte posted above {Gallery template='name_of_template_as_saved_from_above_sample'}.

Maybe you can post how did you include the Gallery on the page, and how those templates look like.
dikomix
Forum Members
Forum Members
Posts: 10
Joined: Sat Jul 09, 2011 8:23 am

Re: Gallery module: show all subgalleries' content on one pa

Post by dikomix »

When i use default code, is working, but only create a "folder icon", not thumbnail. I want to use your code only to create thumbnail, but unsuccessfully:(

I have 2 Gallery. I want, open site with maindir Gallery, set on site is {Gallery}. Subgalleries is other site with code {Gallery dir='DP2'} and {Gallery dir='DP2'} and {Gallery dir='DP2funny'}. I want to generate the thumbnail (3 pict. from xx) on subgalleries, and after click on picture view all pictures in funcybox. On title I try create hyperlink and then view only one gallery, but I dont know how create the dynamic hyperlink (creating with url gallery).

Where I must copy your code? I must create the sub_gallery template and replace default code in <div's> with your?

And main Gallery site must template fancybox(lightbox..)?

thanks
dmaireroa
Forum Members
Forum Members
Posts: 110
Joined: Wed Jul 15, 2009 12:35 am

Re: Gallery module: show all subgalleries' content on one pa

Post by dmaireroa »

Are you talking about the sub-directories on one page or do you want to display every individual photo on one page? {Gallery} I added this code to display my sub-directories.

I only just started using it and I am having problems trying to display the pages properly once you click on a sub-gallery directory.

Any suggestions?
Locked

Return to “Modules/Add-Ons”