We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26388
    • 103 Posts
    Ok here is the basic scenario, the site has lets say 5 different sections ’top level navigation.’ Each section header has a different image and/or flash movie. Instead of creating a separate template per section, is there a way to setup one template with dynamic image calls based on the parent page ID? Is it possible to do this? Or, is creating separate templates the simpler way to go about it?

    Thanks in advance!
      • 22303 MODX Staff
      • 10,725 Posts
      Lot’s of ways to approach it with MODx without creating multiple templates. The ones that come to mind immediately are:
      [#] Using a TV with @INHERIT binding as default value, then setting the value for each top level parent
      [#] Using a snippet in your template that renders a header based on the top level parent
        • 26388
        • 103 Posts
        Quote from: OpenGeek at Apr 24, 2007, 04:35 PM

        Lot’s of ways to approach it with MODx without creating multiple templates. The ones that come to mind immediately are:
        [#] Using a TV with @INHERIT binding as default value, then setting the value for each top level parent
        [#] Using a snippet in your template that renders a header based on the top level parent


        Thanks for the input here. I got it working like a charm with the @INHERIT binding.

          • 28042 ☆ A M B ☆
          • 24,524 Posts
          I love that @INHERIT binding; there’s seldom a site I work on that doesn’t use 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