<![CDATA[ [SOLVED] Gallery items issue when linked to from GalleryAlbums thumbnail - MODX Community Forums]]> https://forums.modx.com/thread/?thread=94374 <![CDATA[ [SOLVED] Gallery items issue when linked to from GalleryAlbums thumbnail]]> https://forums.modx.com/thread/94374/gallery-items-issue-when-linked-to-from-galleryalbums-thumbnail#dis-post-511345 I am following this tutorial

The GalleryAlbums snippet works perfect using following code on page id71 showing my 3 test albums:

[[!GalleryAlbums? &rowTpl=`GalleryrowTpl` &toPlaceholder=`galleries` &prominentOnly=`0`]]
<div class="css-wrapper">[[+galleries]]</div>

<div class="span4 item">
<a class="preview" href="[[~103]]/?[[+albumRequestVar]]=[[+id]]" title="[[+name]]">
  <img src="[[+image]]&w=320&h=240&zc=1" alt="[[+name]]">

Problem is when these album thumbnails are clicked they take me to my custom 404 page.

The page that should show the album images is page 103 and it has the following code on it
[[!Gallery? &toPlaceholder=`gallery` &thumbTpl=`GalleryrowTpl2` &thumbWidth=`200` &thumbHeight=`160` &thumbQuality=`80`]]
 <div class="row">
  <div class="text-title">
     <a href="[[~[[*parent]]]]"><button type="button" class="btn">back to overview</button></a>
  <div class="css-wrapper">

<div class="span2 item2">
 <a class="preview" href="[[+image_absolute]]" title=" " rel="prettyphoto[pp_gal]">
  <img src="[[+thumbnail]]" alt=" " class="img-rounded">

The url from the Gallery Albums thumbnails is like this:

That is linking to the correct page of id 103 alias gallery-1 if I remove the /?galAlbum=1 from the end of the url the page loads fine minus the gallery pictures but with that added it defaults to my 404 page.

I tested the snippet with this
[[!Gallery? &album=`Album 1`]]

That output thumbnails fine but it cant seem to read info via the URL. I have friendly url turned on dont think that should be an issue.

I am using Revo 2.3.1 and gallery is 1.7.0

Have i missed something or does the above look correct.



panfire Sep 26, 2014, 05:32 PM https://forums.modx.com/thread/94374/gallery-items-issue-when-linked-to-from-galleryalbums-thumbnail#dis-post-511345
<![CDATA[Re: [SOLVED] Gallery items issue when linked to from GalleryAlbums thumbnail]]> https://forums.modx.com/thread/94374/gallery-items-issue-when-linked-to-from-galleryalbums-thumbnail#dis-post-551605
I discovered why the gallery was not shown.

<a class="preview" href="[[~21]]?[[+albumRequestVar]]=[[+id]]" title="[[+name]]">


<a class="preview" href="[[~21]]&[[+albumRequestVar]]=[[+id]]" title="[[+name]]">

Now a new problem has arisen, when I click on an image in the gallery to zoom, it calls the URL:


The image is not found because I know the URL is in error. For modx-gallery is being repeated.

I await a solution.

Moli Montez]]>
molimontez Jun 09, 2017, 12:10 AM https://forums.modx.com/thread/94374/gallery-items-issue-when-linked-to-from-galleryalbums-thumbnail#dis-post-551605
<![CDATA[Re: [SOLVED] Gallery items issue when linked to from GalleryAlbums thumbnail]]> https://forums.modx.com/thread/94374/gallery-items-issue-when-linked-to-from-galleryalbums-thumbnail#dis-post-511385 sitsol Sep 27, 2014, 06:38 AM https://forums.modx.com/thread/94374/gallery-items-issue-when-linked-to-from-galleryalbums-thumbnail#dis-post-511385 <![CDATA[Re: Gallery items issue when linked to from GalleryAlbums thumbnail]]> https://forums.modx.com/thread/94374/gallery-items-issue-when-linked-to-from-galleryalbums-thumbnail#dis-post-511382
In the above thread the GalleryrowTpl had this inside it
<a class="preview" href="[[~103]]/?[[+albumRequestVar]]=[[+id]]" title="[[+name]]">
  <img src="[[+image]]&w=320&h=240&zc=1" alt="[[+name]]">

All i needed to do was drop the forward slash after the page ID.
Guess the original author had buried the path to his pages deeper in the file structure.
Maybe this post will help someone else as I cant find many code examples around for gallery i think the Sitsol example is really nice.

Maybe I should use this post also as a call for anyone else please show some code examples of Gallery.


panfire Sep 27, 2014, 05:09 AM https://forums.modx.com/thread/94374/gallery-items-issue-when-linked-to-from-galleryalbums-thumbnail#dis-post-511382