I am trying to check if a variable exists, and render it only if it does. Using the code below, the "{if facebook_content..." etc renders to the screen, curley braces and all, rather than actually checking for this conditional. Its like it doesn't get processed at all. Why is this happening and how can I actually do this?

    {exp:stash:get_list name="st_facebook_feed_list" parse_tags="yes" process="end"}
                <a target="_blank" href="{facebook_url}">
                    <span class="feed-text">
                        {if facebook_content != ''}

I beleive you can get some info from this ist : https://gist.github.com/croxton/9d012297096892ca5c10

The premise is the insides of the stash tag is parsed at the stage the module tags are parse, whereas conditionals are passed before (simple) and after (advanced).

Have you tried messing about with {exp:stash:parse} inside the get_list tag pair?

Also, what are your results when you call get_list without the process="end" parameter? I believe this may move the parsing of the inard of your tag to after all the conditional steps, ergo no evaluation. Of course you don't show us where you set the list so I couldn't debug the parse order any further.

| 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.