We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34120
    • 236 Posts
    Hopefully not too tricky, I'm using galleryAlbums to create the navigation for my galleries. Is there a hereClass like in Wayfinder? So I can style up the nav link for the currently selected gallery?

    Thanks!
      • 24865
      • 289 Posts
      While it has been a while for me since I've used it, AFAIK GalleryAlbums navigates via GET/REQUEST variables. Perhaps you can do a check that sees if, for example: [[!request:eq=`[[+id]]`:then=`class="active current"`:else=``?key=`albumId`]].


      Oh and note that the request ([[!request]]) snippet is not part of MODX, though I still thing it should be!
        @MarkGHErnst

        Developer at Adwise Internetmarketing, the Netherlands.
        • 26503
        • 620 Posts
        I'm not sure, I don't see one in the docs, but maybe you can hack around it with something like:

        <li[[+cls:notempty=``]] class="[[!if? &subject=`[[*id]]` &operand=`==` &operator=`[[+id]]` &then=`active`]]" >
        	<a href="[[~[[*id]]? &[[+albumRequestVar]]=`[[+id]]`]]">[[+showName:notempty=`[[+name]]`]]</a>
        </li>
        


        [check the syntax wink ]

        -sean
          *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

          Sean Kimball CLP, CLS.
          Technical Director / Sr. Developer | BigBlock Studios
          ._______________________________________________.
          Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
          27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
          phone/fax: 905-426-5525
          • 34120
          • 236 Posts
          Hey, thanks for the replies, much appreciated.

          That works a treat Sean, I just needed to swap the operand and operator around
          [[!if? &subject=`[[*id]]` &operator=`==` &operand=`[[+id]]` &then=`active`]]

          The If snippet is new to me.

          Many thanks!

            • 38917
            • 17 Posts
            The above solution didn't work for me but I'va managed to resolve the problem, posted it here:
            http://forums.modx.com/thread/80160/gallery---highlight-current-active-album-fiendly-url
              muriz.com