Stash
ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4, ExpressionEngine 5, ExpressionEngine 6
Back to this add-on's main page
View Other Add-ons From Mark Croxton
Stash Multiple Nested Lists Within Each Other
Support Request
Dan Crystal
|
Posted: 27 August 2014 06:39 AM |
|
|
|
Hi,
I am currently using stash to create a list.
Within this list I have a channel entries tag pair, within this I have nested list.
Within this nested list I have a playa:parents tag pair and I am attempting to create another nested list within this.
The problem comes at the third nested list.
I currently have something similar to:
{exp:channel:entries site="default_site" channel="developments" disable="members_data|pagination|category_fields" limit="1" url_title="{segment_3}"} {stash:entry_id}{entry_id}{/stash:entry_id} {exp:stash:set_list:nested name="plot_{entry_id}" parse_tags="yes" parse_depth="2"} {exp:playa:parents site="default_site" channel="plots" order_by="plot_number" search:plot_number="={segment_5}" search:availability="=5" limit="1"} {exp:playa:children site="default_site" field="property_style" parse_depth="2"} {stash:property_id}{entry_id}{/stash:property_id}
{exp:stash:set_list:nested name="floor_plans_{entry_id}_{property_id}" context="{entry_id}" parse_tags="yes"} {floor_plans} {stash:floor}{floor}{/stash:floor} {/floor_plans} {/exp:stash:set_list:nested}
{/exp:playa:children} {/exp:playa:parents}
{/exp:stash:set_list:nested}
{/exp:channel:entries}
I think I the issue resolves around the {property_id} as ideally you need to use {entry_id} within the playa:children tag however I have also tried using context to target the specific {entry_id} within this tag pair and not the {entry_id} associated with the entries:channel.
Any help or tips would be much appreciated.
Regards
Dan
|
|
|
Mark Croxton
|
Posted: 01 September 2014 09:36 AM |
# 1
|
|
Developer
|
The problem there is that each pair of nested stash:set_list tags must have a unique 4th tagpart. It’s usually a good idea to make these relate to the list you’re setting, but they can be entirely arbitrary providing they are unique per tag pair: Eg:
{exp:stash:set_list:plots name="plot_{entry_id}" parse_tags="yes" parse_depth="2"}
{exp:playa:parents site="default_site" channel="plots" order_by="plot_number" search:plot_number="={segment_5}" search:availability="=5" limit="1"}
{exp:playa:children site="default_site" field="property_style" parse_depth="2"}
{stash:property_id}{entry_id}{/stash:property_id}
{exp:stash:set_list:plans name="floor_plans_{entry_id}_{property_id}" context="{entry_id}" parse_tags="yes"} {floor_plans} {stash:floor}{floor}{/stash:floor} {/floor_plans} {/exp:stash:set_list:plans}
{/exp:playa:children} {/exp:playa:parents}
{/exp:stash:set_list:plots}
This is an EE template parser limitation btw. The unique 4th tagpart helps EE match the opening and closing tags of a pair.
|
|
|
Diana
|
Posted: 24 December 2022 06:03 PM |
# 2
|
|
|
To order our essay writer service, you’ll have to spend essay writing service roughly 3-5 minutes. In return, you could enjoy 3-5 hours of free time in the evening because your essay will be taken care of by one of our essay writers.
|
|
|
jendy
|
Posted: 28 December 2022 10:20 PM |
# 3
|
|
|
I appreciate your aid and your prompt response. In order to 1001 games locate the specific folders to be placed in the top level third party folder, it turned out that I just needed to delve deeper into the reservation folder.
|
|
|