It does, in both engines, as long as it sits at the top level of the child, before or after the extends tag and outside any block; rendered through the platform's own Smarty and Twig, the parent sees it everywhere. What does not reach the parent: an assignment inside a block, which Smarty exposes only after that block has rendered and Twig never; an assignment made inside an included partial, which stays in the include unless Smarty's scope='parent' is used; and a value the parent reads in a component rendered with getHtml(), which sees no template variables at all. For the last two, use _templateContext.
Answer
Templates and engines
A variable assigned before the inheritance tag does not reach the parent
More in Templates and engines
Was this page helpful?
Your answer goes to the docs team.