We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14438
    • 6 Posts
    ... but I’m sure there’s someone here who can point me in the right direction.

    I have a picture in my template in a certain area, I want to change that picture based on what page they’re in but I don’t want to put it in the document, it gives the person editing the page an opportunity to screw something up (e.g. my alignments, or adding additional properties to the image, etc).

    It would be a huge plus, if I could have a default image, so in case I don’t have an image for that page it’ll automatically use a generic one.

    Any ideas?

    I’m sure modx can do this, just unsure where or what.
      • 3749
      • 24,544 Posts
      I think you want a Template Variable with the default value of:

      @INHERIT path/to/default/image


      Just put a TV tag [*TV-Name*] in your template where you want the image to appear.

        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
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        And if you create a document group just for that TV, only the original Admin user will be able to see it when editing documents, so you don’t have to worry about your editors messing with it.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org