1

Can't quite figure this one out. Trying to set and then get "program_sponsor" within stash:content

program_sponsor is returning blank with stash:get

{exp:stash:set parse_tags="yes" parse_conditionals="yes"}
    {exp:switchee variable="{segment_2}"}
        {case default="yes"}
            {stash:content}
                {exp:channel:entries channel="programs" url_title="{segment_2}" dynamic="no" limit="1"}
                    {stash:program_sponsor}
                        <p>Who loves bacon?</p>
                    {/stash:program_sponsor}
                {/exp:channel:entries}

                {!-- 
                    chunck of other channel entry code goes in-between here
                --}

                {!-- Need to output this variable set earlier above --}
                {exp:stash:get name="program_sponsor"}

            {/stash:content}
        {/case}
    {/exp:switchee}
{/exp:stash:set}
1
  • Try parse_depth="2" on your {exp:stash:set} tag. Aug 23 '13 at 20:50
0

Tried parse="inward" on the switchee tag which caused nothing to return.

Also tried parse_depth="2" on the exp:stash:set tag.

To fix this I stripped out the stash:program_sponsor from stash:content and made more separation rather than setting a stash variable within a variable expecting then to grab it later in the same variable.

I changed my layout to include all the individual variables. What I was hoping to accomplish is narrow everything down to 1 variable which would have been stash:content.

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.