I have a problem with a Stash embedded template being called when it's inside a switch statement (or a conditional, already tried that too) which should evaluate as false.

For example:

{exp:switchee variable="{stash:_nav_active}" parse="inward"}

    {case value="home|404"}{/case}

    {case default="Yes"}




even when stash:_nav_active equals 404, the embed is being called and because the segment doesn't exist, I get:

Stash: the file "/stash_templates/partials/nav/made-up-segment.html" was not found.

2 Answers 2


I think since your stash embed is set to process on 'start' it will be run first before switchee, which is why you'd see a 'file not found' error if there's no stash file at that location. Try changing your embed to process="inline" and see if you still get the same error.


Pretty sure I recall that if you're evaluating a stash variable you can remove the square brackets.

variable="stash:my_var" parse="inward"
  • Gave that a go, but got the same result.
    – Tyssen
    Commented Jan 28, 2015 at 8:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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