We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31104
    • 108 Posts
    I have a TV where input type is galleryitem and would like to set a default galleryitem in case none is chosen.

    What's the correct syntax to set this up, I mean what do I put in the default field?

    Something like albumId:galItemId? or how is it done? [ed. note: upiorz last edited this post 14 years, 1 month ago.]
      • 31104
      • 108 Posts
      I've tried pasting the whole html output that I get with an item already set on another resource.

      <img src="/assets/components/gallery/connector.php?action=web/phpthumb&w=&h=&f=png&src=%2F-%2Fassets%2Fgallery%2F88%2F1879.jpg" alt="" title="villas.jpg">


      But nothing, it actually has no output at all sad
        • 18373 ☆ A M B ☆
        • 3,141 Posts
        Don't have a Gallery install I can quickly try this on, but from the code it looks like it is expecting JSON data like such:
        {"gal_id":"15"}

        where the 15 is an item ID.
          Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

          Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
          • 31104
          • 108 Posts
          Yes! that was it, I better give my JSON ebook a read, it looks I'll be using a lot of it after all.

          Thanks Mark.