0

I have the following template that sets values, including a set_list for a Channel Images field, but I can't get the Channel Images data to be displayed in the stash layout;

{stash:embed:layouts:page}

{exp:channel:entries 
    channel="shop-pages"
    disable="{global:channel_disable_basic}"
    require_entry="yes"
}
    {exp:stash:set parse_tags="yes" parse_depth="3"}
        {stash:meta}{exp:nsm_better_meta:template entry_id="{entry_id}"}{/stash:meta}
        {stash:page_title}{title}{/stash:page_title}
        {stash:page_entry_id}{entry_id}{/stash:page_entry_id}
    {/exp:stash:set}

    {exp:stash:set_list name="images" parse_tags="yes" parse_depth="3"}
        {cf_page_heroes}
            {stash:page_hero_image}{image:url}{/stash:page_hero_image}
            {stash:page_hero_title}{image:title}{/stash:page_hero_title}
            {stash:page_hero_description}{image:description}{/stash:page_hero_description}
        {/cf_page_heroes}
    {/exp:stash:set_list}

{/exp:channel:entries}

However, I can't get the Channel Images data to be displayed in the stash layout with the following code (it simply outputs the expressionengine tags);

<h1>{exp:stash:page_title}</h1>

{exp:stash:get_list name="images"}
    {stash:page_hero_image}
    {stash:page_hero_title}
    {stash:page_hero_description}
{/exp:stash:get_list}

Can anyone advisse what might be wrong?

Thank you.

1

The variables inside get_list should not be prepended with stash: - You only do that when you're getting or setting a single variable directly, but it's your parent get_list tag which is doing the getting, so you should just get the vars as:

{exp:stash:get_list name="images"}
    {page_hero_image}
    {page_hero_title}
    {page_hero_description}
{/exp:stash:get_list}
1
  • Oh my gosh. More coffee for me. Thanks James. Jun 5 '14 at 13:01

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.