We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18409
    • 54 Posts
    I’m trying to allow certain users to create new photo galleries by using news publisher, calling a tempate with a hidden content field with the maxigallery call that I want to go into the page.
    ie:
    <snip>
    <input type=’hidden value="[[MaxiGallery? &display=`embedded` &embedtype=`slidebox` &pics_in_a_row=`3` &max_thumb_size=`110` &max_pic_size=`800` &thumb_use_dropshadow=`1`]]" name=’content’>
    </snip>

    But modx runs the maxigallery snippet instead. Is there anyway of "escaping" the snippet call so it just puts the exact text above into the new document?

    Or am I on completely the wrong track here!!!

    cheers, mark
      • 11975
      • 2,542 Posts
      Hi,

      I guess you should try to create a plugin instead of using an hidden field.

      First you have to choose the most appropriate event in modx to attach the snippet call to the content when a doc is created by the allowed group.

      :-)

      EDIT: OnBeforeDocFormSave seems to be the right one.
        Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
        • 7923
        • 4,213 Posts
        Can’t you make own template for the gallery pages that have the maxigallery snippet call in the template and then make newspublisher use that template for new documents?


          "He can have a lollipop any time he wants to. That's what it means to be a programmer."
          • 18409
          • 54 Posts
          Of course I could do that, but why do it a simple way when my way was much more complicated smiley

          Working fine now, thanks for the tip.