We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32678
    • 290 Posts
    Greetings - I am displaying images using a Flash slideshow that’s populated by an xml feed. The site’s user controls whether an image appears in the feed using a template variable called ’homeSS’. The images themselves are included by the user with a tv called ’imageFile’, and this is associated to a template called ’imagePage’.

    Basically, this means that if you have 100 images to include in the slideshow, you need to edit 100 page resources by opening each ’imagePage’, ticking the homeSS tv, and then saving.

    I need to streamline this process. The solution I’m working on is a configuration page that would list the site’s images and associate the the homeSS tv to each. I have Ditto listing the images and would like to know if there’s a way to list the template variable, too. Naturally, if I include tv_homeSS in the ditto tpl it returns the tv’s value. I’d like to know if I can surface the template variable itself into the page’s presentation layer.

    Or, is the solution to modify the configuration page’s admin template?? I have no idea how to go about this and pulling it off might be above my skill level, but perhaps all of this needs to be accomplished thorough the admin UI??

    Hope I’ve explained this sufficiently. Thanks for any help you can provide! This is for Evo 1.0.4 and Ditto 2.1.
      • 3749
      • 24,544 Posts
      I’m not sure I understand what you’re trying to do, but you can put the pages under a container document and give the TV a default value of @INHERIT so they’re inherit the value of that TV from the container. There might be some way to make that work for you.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 32678
        • 290 Posts
        Thanks for the response. I want to provide the choice for whether an image is included in the slideshow. The solution I have now works - the Flash slideshow reads an xml feed produced using Ditto. This Ditto call looks for the value of a tv called ’homeSS", which is a simpe yes/no tv. If ’yes’, that image is included, if ’no’, it’s filtered. The tv that contains the image is called ’imageFile’.

        The problem is that the process for including an image into the slideshow is laborious. The tv ’imageFile’ is associated to a template called ’imagePage’. In order to include an image in the slideshow, every instance of the imagePage needs to be edited (by the user editing the page resource in the admin UI, selecting ’yes’ for tv_homeSS, and saving).

        I’d instead like to list all of the images (tv_imageFile) one a single page, hence centralizing the selection for inclusion in the slideshow. What I need to do to accomplish this is include the tv homeSS with each image. I’m not sure how to go about this. Perhaps a module is the right solution?

        Again, hope this makes sense...
          • 18373 ☆ A M B ☆
          • 3,141 Posts
          Couldn’t you use EvoGallery? (check out https://github.com/Mark-H/evoGallery for a slightly updated version of the one in the repo)

          EvoGallery creates galleries on a per-page basis - so one gallery per resource. You could set up one resource and list the images from that resource in your xml feed resource?
            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.
            • 32678
            • 290 Posts
            Thanks Mark. I tried both EvoGallery and Maxi Gallery early on during development and found them to be buggy. It easily could have been pilot error, as at the time I was still very much on the modx learning curve (and am not a programmer by a long shot). Perhaps both are worth another look.

            However, I’m so far down this path that backing up now would be pretty painful. So, would love a solution based on the scenario I’ve described, if said scenario is even feasible. Still unsure on this point.