Page 1 of 1

Gallery module - clicks from {Gallery} sidebar

Posted: Thu Oct 08, 2015 9:15 pm
by spinfold
Hi,

The sidebar on my site has a {Gallery dir="Projects" number="3" template="sidebar"} call. This works well, displays the top three photo galleries, in a specially-designed template. The way this site has been setup, these will always be directory links - there will be no single images inside the "Projects" directory.

However, when clicking on a link, it takes me to that gallery page but only displays the first three photos inside that gallery.

I have another page (listing all galleries) which, when I click on the same gallery, displays all the photos even though the sidebar is present on the page.

URLs:
- http://www.artisanbespokebuilders.co.uk/photo-gallery/ - click on, say, Whitwell (middle column, top row) and you see 14 photos.
- http://www.artisanbespokebuilders.co.uk/testimonials/ - click on Whitwell from the sidebar, and you now only see three photos.

I'm using the Gallery module with CGSmartImage to resize the photos accordingly, and CMSMS 1.12.1 (I haven't quite got to grips with the new stuff in 2.x to dare do a paid job on it yet).

Any help appreciated.

Re: Gallery module - clicks from {Gallery} sidebar

Posted: Fri Oct 09, 2015 7:37 am
by spinfold
Workaround for now is to |replace the links in the sidebar template to remove the "1-3" part of the URL, like so:

{$image->file|replace:'/1-3-':'/'}

I'm assuming the first number is the pagination start, and the second is the number of photos to display.

If there is a better way around this (as if my client decides in future to display five galleries in the sidebar rather than three, this code will need updating) please let me know.