We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49680
    • 19 Posts
    Hello

    I am new to this forum, although I have been using modX (evo) in 2008-2011 .

    I have some very old websites made with Etomite, that now has stopped working. Since Etomite i discontinued, I have decided to transfer them to modX (revo).

    The translation of the etomite-templates is still straight forward, and the menues etc is driven by very simple snippets, I made myself, and it was only minor tweeks to get them up and running in revo!

    But a couple of the old websites use the Etogal-gallery snippet.

    In modX revo there seems to be only one gallery-snippet - Gallery.
    So I am now trying to get it to work somehow like the Etogal-gallery.

    This means:
    One page with thumbnails. Clikking on a thumbnail, brings you to a new page showing this image, and with pagination beneath.

    And now to my question:

    In modX's Gallery, there is a snippet called GalleryItemPagination, which seems to do what I am looking for.
    But the only thing I get out from it is `]]
    To me there seems to be a problem with the code in the last section after the line: "Now set up your placeholders for the navigation:"

    [[!GalleryItemPagination? &album=`1`]]
    [[!If? &subject=`[[!+galitem.prev.id]]`&operator=`isnotempty` &then=`
    <a id="previmg" href="[[++site_url]]?id=[[*id]]&galItem=[[!+galitem.prev.id]]&galAlbum=1&galTag=">previous image</a>`]]
    [[!If? &subject=`[[!+galitem.next.id]]`&operator=`isnotempty` &then=`
    <a id="nextimg" href="[[++site_url]]?id=[[*id]]&galItem=[[!+galitem.next.id]]&galAlbum=1&galTag=">next image</a>`]]
    `]]

    I would like to know, if someone here at the forum has been able to get the GalleryItemPagination-snippet to work with revo 2.x, and if so if the code above is correct?

    All the best

    This question has been answered by lecable. See the first response.

      • 37242 ☆ A M B ☆
      • 339 Posts
      I am just trying that navigation snippet and it does not work for me either.

      [Fri Sep 04 14:26:20.853698 2015] [fcgid:warn] [pid 24450] [client 78.53.183.170:53072] mod_fcgid: stderr: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 32 bytes) in /var/www/vhosts/1234/httpdocs/core/xpdo/xpdo.class.php on line 2016
      [Fri Sep 04 14:30:18.895818 2015] [fcgid:warn] [pid 24594] [client 78.53.183.170:53134] mod_fcgid: stderr: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 72 bytes) in /var/www/vhosts/1234/httpdocs/core/model/modx/error/moderrorhandler.class.php on line 72
      [Fri Sep 04 14:30:50.039255 2015] [fcgid:warn] [pid 24672] [client 78.53.183.170:53148] mod_fcgid: stderr: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 72 bytes) in /var/www/vhosts/1234/httpdocs/core/xpdo/xpdo.class.php on line 2015
      [Fri Sep 04 14:36:58.818995 2015] [fcgid:warn] [pid 24808] [client 78.53.183.170:53241] mod_fcgid: stderr: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 72 bytes) in /var/www/vhosts/1234/httpdocs/core/model/modx/error/moderrorhandler.class.php on line 71
      [Fri Sep 04 15:14:22.132340 2015] [fcgid:warn] [pid 25317] [client 78.49.112.32:53529] mod_fcgid: stderr: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 77 bytes) in /var/www/vhosts/1234/httpdocs/core/cache/includes/elements/modsnippet/65.include.cache.php on line 44
      [Fri Sep 04 15:16:17.796183 2015] [fcgid:warn] [pid 25552] [client 78.49.112.32:53574] mod_fcgid: stderr: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 72 bytes) in /var/www/vhosts/1234/httpdocs/core/model/modx/error/moderrorhandler.class.php on line 73 
        • 9266 ☆ A M B ☆
        • 77 Posts
        Exceleron Designs Reply #3, 11 years ago
        lecable,

        If you just need a simple easy to use always going to work gallery you may want to try this. https://www.modmore.com/extras/moregallery/ It is a premium MODX plugin that works great. I have used it for several clients and it just simple works. There is a great demo front end and back end. This way you don't have to try to fix the GalleryItem Pagination snippet which is touchy.

        • discuss.answer
          • 49680
          • 19 Posts
          Hello
          As nobody answered my question in this thread, I decided to write my own snippet. A quick and dirty snippet, that make use of modX's document-tree with TV's for the individual images and the pThumb-extension to automatically scale the images and thumbnails. This works for me, so right now my gallery-needs are fulfilled! But thanks for pointing to the more gallery.