0

I would like to use the Stash embed functions, but I don't know how to define the template path.

In the Stash docs:

{!-- Stash template file at /path/to/stash_templates/test.html --}
{stash:embed name="test"}

How to define and set the path to the embedded template called test??

It is similar to the variable setting?

{!-- set a variable --}
{exp:stash:set name="foo"}bar{/exp:stash:set}

thanks.

2

As the docs explain, you need to setup your paths in your config:

$assign_to_config['stash_file_basepath'] = '/path/to/stash_templates/';

The docs are here: https://github.com/croxton/Stash/wiki/Installing-%26-upgrading

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.