0

So I have the following snippets of code which contain a matrix field {people} with a nested playa field {section_people}

{!-- Get people sections --}
{exp:stash:set_list name="people_sections" parse_tags="yes"}
    {people}
        {stash:section_people}{section_people:child_ids}{/stash:section_people}
    {/people}
{/exp:stash:set_list}

{!-- Get related people: --}
{exp:stash:set_list name="people_list" parse_tags="yes" parse_depth="3" trim="yes"}
    {exp:channel:entries channel="people" dynamic="no" entry_id="{exp:playa:child_ids field='people'}" parse="inward" disable="{global:param_disable_default}"}
        {stash:entry_id}{entry_id}{/stash:entry_id} 
        [other fields]
    {/exp:channel:entries}
{/exp:stash:set_list}

{!-- Display: --}
{exp:stash:get_list name="people_sections"}
<section class="team">
    <h2>{section_title}</h2>
    {exp:stash:get_list:nested name="people_list" match="#{section_people}#" against="entry_id"}
        <article>{entry_id}</article>
    {/exp:stash:get_list:nested}
</section>
{/exp:stash:get_list}

What I'd like to accomplish is: keeping the playa entries in a fixed order: 640|643|639

However, when I get the entries using the stash get_list they are returned by entry date: 643|640|639

I see in the stash docs where I can sort by column, but is there a way to used a "fixed" sort order?

1 Answer 1

3

In your channel entries tag, use the fixed_order parameter instead of entry_id.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.