croxton / Stash

Stash allows you to stash text and snippets of code for reuse throughout your templates.
GNU General Public License v3.0
197 stars 20 forks source link

Stash Embeds not working with stash:embed but will work with exp:stash:embed #146

Closed perry-garvin closed 7 years ago

perry-garvin commented 8 years ago

Running EE3 and Stash 3.0.3 and when I try to embed via {stash:embed} it fails but when I use {exp:stash:embed} it works! This is contrary to the documentation. Am I doing something wrong?

croxton commented 8 years ago

There is a problem with {stash:embed} in the latest version of EE (3.4) which is due to a bug in the template parser, which I have been assured will be fixed in 3.4.2. See: https://devot-ee.com/add-ons/support/stash/viewthread/15946

Unless you need to use embeds with process="start" it is fine to use {exp:stash:embed} instead.

If you do need to use process="start" then use : as a delimiter for the path to the template rather than /, e.g.

Do this: {stash:embed name="my:template" process="start"}

Don't do this: {stash:embed name="my/template" process="start"}

mvdesign commented 7 years ago

For what it’s worth, this appears to still be broken in EE 3.4.7 and Stash 3.04.

{exp:stash:embed:embed_name} works, but {stash:embed:embed_name} just outputs the tag in plain-text