All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Reordering playa parent entries

Toby Catlin 23 Oct 2012 12:30 question, complete

Hi Low,
Props for all your work on EE add-ons. Half my modules list is low-something-or-another. I have been reading your code in an effort to learn how to program my own add-ons.

I have a bunch of detail pages that use playa to relate to each other. Each page has a side bar that lists the other related pages organised by category

 
{exp:channel:categories channel="detail"}
<h4>{category_name}</h4>

{exp:channel:entries channel="component" disable="{disable_fields}"}
<ul class="nav_items">
{exp:playa:parents channel="detail" dynamic="no" category="{category_id}" }
<li><a href="url_title_path='developer/component/{segment_3}/{category_url_title}'}">{title}</a></li>

{/exp:playa:parents}

</ul>

{/exp:channel:entries}

{/exp:channel:categories}
</pre>


I have succeeded in reordering the nav bar links by adding a numeric order field to the detail channel and putting a order_by in the exp:playa:parents loop.

However I much prefer the interface provided by Reorder and would very much like to use it. Is it feasible to use it in such a setup? Any tips would be great

thanks
toby

Replies

  1. Low 23 Oct 2012 13:12

    Hi Toby,

    Thanks for the kind words.

    I'm not sure if the playa:parents tag supports the fixed_order="" parameter (ask P&T for that), but if it does, you could create a set for all parents, and then feed the entry ids to (using the low_reorder:entry_ids tag) the playa tag. You might need to use an embed to get that working.

  2. Toby Catlin 23 Oct 2012 14:32

    Thanks for getting back to me so quickly.

    P&T docs say that playa:parents supports nearly everything channel:entries supports so unless i am very unlucky it should support fixed_order.

    I'll have a play with low_reorder:entry_ids tag and see where i get.

    thanks again
    toby