We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36830
    • 140 Posts
    Hi guys. In your opinions, what would be the best and easiest way to rig up a template so that a user can quickly insert a slideshow or gallery into a newspost? Almost as if TinyMCE had a magic "insert gallery" button... Thanks!
      • 10208 ☆ A M B ☆
      • 1,780 Posts
      You can use a MIGX TV for the images, a slider (pick one) and then another TV yes/no radio button to turn it on and off. Use the Switch snippet/extra in the template to show it or not, or the If extra and place the code in a chunk. Don't forget to assign the TV's to the article template.

      With Switch:
      [[switch?
      &get=`[[*optional_slider]]`
      &c1=`yes`
      &do1=`
          <div id="slider">
      	[[!getImageList? &tvname=`migxMultiItemGrid` &docid=`[[*id]]` &tpl=`slideTpl`]]
          </div>
      `&default=``]]


      With If
      [[If? &subject=`[[*optional_slider]]` &operator=`EQ`  &operand=`yes` &then=`[[$migxSlider]]` &else=``]]


      migxSlider Chunk:
      <div id="slider">
      	[[!getImageList? &tvname=`migxMultiItemGrid` &docid=`[[*id]]` &tpl=`slideTpl`]]
          </div>


      Check out Mark Hamstra's tutorial for MIGX galleries as well.
      https://www.markhamstra.com/modx-blog/2012/04/managing-galleries-with-migx/
        Frogabog- MODX Websites in Portland Oregon
        "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
        Having server issues? These guys have MODX Hosting perfected - SkyToaster
        • 36830
        • 140 Posts
        Thanks. I'll try this option out.