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

Support archive

Tried to use Playa and Low Reorder together.

AJ Penninga 2 May 2012 19:59 problem, complete

Hey Low.

As I posted via twitter, I was trying to use Playa and Reorder together.
Previously, playa:parents, playa:children, playa:siblings I could add use the orderby parameter and order my entries (limited by Playa) using my Reorder custom field.

I wasn't quite sure how to figure this out.

After some digging into both Reorder and Playa, I realized that Playa has a few variables that would make passing the entry IDs to an embed very easy.

This was my final solution to get things to work:

[code]
TEMPLATE:
{exp:channel:entries channel="solution_categories" dynamic="no" limit="1" url_title="{segment_2}"}
{embed="solutions/_category_parents" entry_ids="{exp:playa:parent_ids}"}
{/exp:channel:entries}

EMBED:
{exp:low_reorder:entries set="1" entry_id="{embed:entry_ids}"}
...
{/exp:low_reorder:entries}
[/code]

So, thanks for the help and the sweet docs!

Replies

  1. Low 2 May 2012 20:14

    Yeah, the orderby="" method won't work anymore. I will add a {exp:low_reorder:entry_ids} tag to output a pipe-delimited list of ordered entry_ids, which might help in the future.

  2. Low 8 May 2012 09:07

    v2.0.2 gives you the Entry IDs tag.

  3. AJ Penninga 8 May 2012 13:03

    Awesome! Thanks for the quick work!

  4. gcman105 19 Nov 2012 14:29

    Hi, could you please show me how to get this to work now?

    <div class="products">
    {exp:playa:parents field="product_collections" orderby="product_display_sort_order" sort="asc"}
    <div class="a_product">
    {if product_detail_image}
    <a href="{path=product}/{url_title}">
    <img class="product_detail_image" src={product_detail_image}"{path}_width310/{filename}.{extension}"{/product_detail_image} width="230px" border="0" alt="{title}" title="{title}" />
    </a>
    {if:else}
    <img src="/images/wg/picture_soon.jpg" width="230px" height="175px" />
    {/if}
    {if editors_pick}
    <div class="editors_pick">
    <img src="/images/wg/editors_pick.png" class="editors_pick" alt="editors pick" />
    </div> <!-- editors_pick -->
    {/if}
    <h3><a href="{path=product}/{url_title}">{title}</a></h3>
    </div> <!-- a_product -->
    {/exp:playa:parents}
    </div> <!-- products -->


    It worked fine until I updated LowReorder, and I'm not sure what to do to get it working again.

    I have created a Gist at https://gist.github.com/4110933

  5. Low 19 Nov 2012 14:56

    The new Low Reorder doesn't use a dedicated field type anymore. Lots of upsides, but your example is a downside. To work around it, use an embed. In the main template:

    {embed="group/ordered_list" entry_ids="{exp:playa:parent_ids field="product_collections"}"}


    In the embedded template (group/ordered_list):

    {exp:low_reorder:entries set="1" entry_id="{embed:entry_ids}"} 
    ...
    {/exp:low_reorder:entries}

  6. gcman105 19 Nov 2012 18:07

    Perfect.

    Problem solved.

    Thank you.