We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 944
    • 3 Posts
    Hi dear community,

    yesterday I setup my website for "mediaboxAdvanced" because I want to integrae some videos on my site.
    While doing this and preparing my template for it I came accros a problem:
    I am using the gallary addon to and I have a self-made chunk that is for building the thumbnail view on pages with a gallery.
    This chunk build the link and the "ref" attribute to make the piture links ready for being display in Lightbox2 before.
    Before they were like this:
    ref="lightbox[[++album]]"

    I only added the album number to be able to show more than one album on a page and not displaying all images on the page in one light box.

    Now with "mediaboxAdvanced" I wanted/have to surround those addtions to "lightbox" in square brackets like
    ref="lightbox[1]"

    But how can I achieve this?
    I only found a workaround that is to insert space in the call like
    ref="lightbox[ [[++album]] ]"


    Is there a way to escape the square brackets so that they are not interpreted by MODx?

    Regards,
    Alexander
      • 4172
      • 5,888 Posts
      you can try this:

      create a new snippet with name ’brackets’ and this code:

      <?php
      return '['.$input.']'; 


      and use it this way as output-filter:

      ref="lightbox[[++album:brackets]]"


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

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!