I'm working on a site where I utilise a custom field to store a pipe-delimited list of related entries, in order to sort Playa's reverse related entries. This looks something like this:
{exp:channel:entries
channel='deals'
limit='1'
}
<h1>{title}</h1>
<ul>
{exp:playa:parents
channel='products'
var_prefix='parent'
fixed_order='{deal_text_product_order}'
}
<li>{parent:title}</li>
{/exp:playa:parents}
</ul>
{/exp:channel:entries}
Now this works fine, my client can order their products (I'm doing this in Safecracker, with jQuery UI Sortable) "and all was well with the world". However, if they add a product after the order's been set, the product isn't shown because it's not in the list in the fixed_order
parameter. Ideally I'd want any products not in the pipe-delimited list to be shown after the products that were in the list... Is there any way to achieve that?
So for example my client sorts the products as 3|1|4|2
, and then publishes new products with ID 5
and 6
, I'd like them to be appended after products 3, 1, 4 and 2, displaying the products in the order 3 1 4 2 5 6. Does that make sense?
Thanks!