We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 35384
    • 26 Posts
    Evolution 1.0.5

    I’ve used the @INHERT to load a variable from a parent page into a child page. To do it from a non parent page someone suggested I needed to use a snippet. Does anyone know what I need to do? I’m a non coder.

    I would like to load a banner image (template variable) from one page into several other pages which are child pages of another parent? This is for Evolution not Revolution.

    Many thanks
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Use the $modx->getTemplateVarOutput() family of API functions, depending on what you’re after. For example,
      $tvPr = $modx->getTemplateVarOutput(array("price"),$docid='2',$published=1);
      echo $tvPr['price'];


        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
        • 35384
        • 26 Posts
        Thanks you so much. It work exactly as I wanted it to.

        Much appreciated