croxton / Stash

Stash allows you to stash text and snippets of code for reuse throughout your templates.
GNU General Public License v3.0
197 stars 20 forks source link

Can't figure out nested list, getting no results #139

Closed sheferd closed 8 years ago

sheferd commented 9 years ago

I'm not having much luck getting my nestedlists to return their data.

{exp:stash:set_list:nested name="event_type_list" parse_tags="yes"}
        {en_event_type}
            {stash:en_event_type_item}{option}{/stash:en_event_type_item}
        {/en_event_type}
{/exp:stash:set_list:nested}

and

{exp:stash:get_list:nested name="event_type_list" prefix="nested"}
            <li>
                {nested:en_event_type_item} (Item {nested:count} of {nested:absolute_results})
            </li>
{/exp:stash:get_list:nested}

I've tried with the context tag also but still no luck. Also I'm not sure I completly understand the context tag?

Thanks

westhouseit commented 9 years ago

Have you seen this section in the docs? https://github.com/croxton/Stash/wiki/Lists#three-and-more-dimensional-lists You're probably missing the link between your nested list and the one it's inside.

BTW, questions like this are best posted on Stackexchange. ;-) http://expressionengine.stackexchange.com/

sheferd commented 9 years ago

Thanks for the reply, I had taken my code directly from the docs and re read that page a bunch of times. I did have context in there as well but with the same result.

thanks for the heads up though, I'll take this over to SE