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

    i am trying to use my maxigallery information as meta tags in my template for the gallery.

    This does not work :
    <meta name="description" content="[+maxigallery.picture.filename:htmlent+]" />
    <title>[+maxigallery.picture.filename:htmlent+]</title>


    does anyone know how i can accomplish this?

    thank you very much!
      • 7923
      • 4,213 Posts
      MaxiGallery placeholder are only available to its templates.

      Only way to do what you seek is to call maxigallery at those places with custom templates that print out only the picture filename.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 32006
        • 12 Posts
        wauw thanks for the quick answer, do you think you can point me in the right direction a little bit?

        I dont really know where to start thanks!
          • 7923
          • 4,213 Posts
          Well.. What display type you are using on the page where you want the picture filename to be seen?

          It would require that you use normal display type as the picture filename can only be get when you are viewing a single picture in normal pictureview. Eg. if thumbnails are listed, which pictures filename it would show?

          Anyways, you would simply call maxigallery with:

          [[MaxiGallery? &pictureTpl=`myPictureTpl`]]


          And then you would have a chunk called myPictureTpl with this content:

          [+maxigallery.picture.filename+]


          Then when you are viewing a single picture, that call should print out the filename.


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 32006
            • 12 Posts
            jeej, that works great, thanks a lot, i can even include my custom fields, thanks a lot.

            maybe you have an idea of how to get the gallery name printed out on the thumbnailpages instead of the filename (that gives an awful lot of results)?

            i was just getting at a point where i thought modx couldnt get better, bet it can !
            you just made my day doze!

            ---------------------------------------------------------------------

            edited:

            i think i can do this by editing my picturetpl to be an entire template en give the page a blank template.

            maybe there is a better way of doing this but i guess this works.

            -----------------------------------------------------------------------

            to bad this doesnt work at all, the chunk isnt being called that way...
            i hop you can point me in the right direction again!
              • 7923
              • 4,213 Posts
              Don’t know what are you saying at in your edits, but you can get the gallery name by using getField snippet in maxigallery templates and get the page title from the gallery document. The gallery document id can be retrieved from [+maxigallery.picture.gal_id+]


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."