We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Handling quote marks when embedding tags in conditionals

Developer Preview

johndwells's avatar
johndwells
94 posts
11 years ago
johndwells's avatar johndwells

Testing on 2.9 preview 8, the following conditional:

{if "{exp:stash:get context='partial' name='page_protected'}" == ""}
    ...
{/if}

Was causing Stash to throw an error whereby it’s parameter values appeared to be false. If instead of using single quotes, I escaped double quotes, the parser worked okay:

{if "{exp:stash:get context=\"partial\" name=\"page_protected\"}" == ""}
    ...
{/if}

HOWEVER, if I go by the docs example and do this:

{if "{current_time format='%F'}" == "June"}
    ....
{/if}

It works just fine and evaluates correctly (currently evals to true), but if I write it by escaping double quotes, the parser evaluates the conditional incorrectly:

{if "{current_time format=\"%F\"}" == "June"}
    ....
{/if}
  • John
       
Pascal Kriete's avatar
Pascal Kriete
2,589 posts
11 years ago
Pascal Kriete's avatar Pascal Kriete

Fixed! Thank you!

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.