Closed alycda closed 10 years ago
Parse order is linear but only within a single 'layer' of tags. Each layer of tags is parsed and 'peeled off' like an onion to expose layers underneath which are then parsed in turn. In other words, EE parsing is recursive rather than completely linear like a scripting language.
If you want to determine the precise order of parsing of your Stash embeds (or indeed any Stash tag that is processed at the end of template parsing with process="end"
) then you can use the priority="x"
parameter, where x is an integer. The higher the value of x the later the tag will be parsed.
I have reviewed your slideshow (per my last issue) but I'm still confused on the following:
/default_site/index.html
/default_site/_stash/partials/head.html
/default_site/_stash/layouts/home.html
/default_site/_stash/partials/footer.html
here's why I'm confused. the
extra-meta
variable properly retrieves the value set from layouts/home but theextra-js
variable returns nothing. So the first thing I tried is addingprocess="end"
to the footer embed, but that didn't work. I could addprocess="inline"
to layouts/home (which works) but then the stash variables I set in index.html aren't available. I also tried addingprocess="end"
to layouts/home but that doesn't work. I then tried addingprocess="end"
to{exp:stash:get name="extra-js"}
and that didn't work. what finally worked is{exp:stash:get name="extra-js" process="end"}
in the index.html file. what I don't understand is why I can't addprocess="end"
to the footer embed, or why the head embed works (since it comes before the home embed) which must be due to parse order, but is confusing because it's not top-to-bottom like I expect with PHP (I know there are benefits to this, it's just confusing with so many stages).