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
-
☆ 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'];
Thanks you so much. It work exactly as I wanted it to.
Much appreciated