0

Hoping someone can help as this has been driving me crazy for 2 days now...

For some reason I just can't get this to work in a template:

{stash:embed:layouts:product}

When I view the page it simply shows that code above. I'm using EE 2.9.2 and Stash 2.6.5.

I have the following structure;

EE templates from file: /_templates/base/_pages.group/product.html (which contains the above embed)

Stash templates: /_templates/base/_stash/layouts/product.html

In my site's index.php I have the following;

// Stash
$assign_to_config['stash_file_basepath'] = $_SERVER['DOCUMENT_ROOT'].'/../_templates/base/_stash/';
$assign_to_config['stash_file_sync'] = ('ENV' == 'prod') ? FALSE : TRUE; // set to FALSE for production
$assign_to_config['stash_file_extensions'] = array('html', 'md', 'css', 'js', 'rss', 'xml');
$assign_to_config['stash_static_basepath'] = $_SERVER['DOCUMENT_ROOT'].'/../public_base/static/';

I can't figure out what is going on. The stash tags just doesn't seem to parse/process and I have this setup exactly the same on another site. Stash looks to be working as it is setting the stash cookie.

I would be really grateful if anyone can help.

0

Make sure that the Stash extension is installed on the extensions page in the control panel. The Stash extension converts {stash:embed_name} into the more "normal" {exp:stash:embed name="embed_name"} in the background, so it could be that for some reason this is not happening.

| improve this answer | |
  • Hey James. I'll post the solution. Mark Croxton helped me resolve the issue via Slack. – doubleplusgood Aug 15 '16 at 20:17
0

It appeared that the install of the latest version of Stash installed multiple of the 2 Stash hooks in the extensions table. Reinstalled the extension and it then correctly added the 4 hooks. However, I had to change the priority of one of the template hook's because another module was causing a problem. Thanks to Mark Croxton for helping cure my sanity with this one.

| improve this answer | |

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.