Sorting parent entries using LOW reorder
Hi there,
I just bought Low reorder and I am not able to use it with EE parents entries for example
I can use the following expression to get entries from the parent channel entries
{exp:channel:entries channel="pages" disable="categories|member_data|pagination"}
{parents field="select_belongs_to"}
{parents:title}
{/parents}
{/exp:channel:entries}
How can I use low reorder to sort the parents channel entries?
Cheers
Nisar
Replies
Low 7 May 2014 10:06
You could create a set with all parents in the desired order, then use your code above to generate a pipe-separated list of entry IDs and feed that to the entry_id parameter of the low_reorder:entries tag.
Nisar 7 May 2014 10:22
you mean by using php? or is there any other way to feed the pipe-separated list to low_reorder:entries tag..because If I use php then PHP Parsing stage to input and Output would be a problem right?
Low 7 May 2014 10:24
You'd probably need to use an embed, or possibly Stash. Don't think PHP would be necessary.
Nisar 7 May 2014 10:26
ok thanks for the reply..lemme try it
Nisar 7 May 2014 10:46
HI There,
I just tried this
{exp:stash:set name="datakwaliteit"}
{exp:channel:entries channel="pages" disable="categories|member_data|pagination"}
{parents field="select_belongs_to"}
{parents:entry_id}|
{/parents}
{/exp:channel:entries}
{/exp:stash:set}
and this shows the pipe separated list of entry_ids like 62|65|89|
{exp:stash:get name="datakwaliteit"}
But when I use stash get variable in low-reorder..I dont see anything..am I doing something wrong in using low-reorder expression which looks like
{exp:low_reorder:entries set="services" entry_id="{exp:stash:get name="datakwaliteit"}"}
{title}
{/exp:low_reorder:entries}
Low 7 May 2014 10:48
I think you need to add parse="inward" to the Entries tag to let the EE parser work its magic on that tag-as-param-value.
Also, try and use single quotes in the stash tag.
Nisar 7 May 2014 10:51
Yes you were right.. adding parse="inward" to the low-reorder tag made it work,so the new low-reorder exp looks something like this
{exp:low_reorder:entries set="services" parse="inward" entry_id="{exp:stash:get name="datakwaliteit"}"}
{title}
{/exp:low_reorder:entries}
may be it can help someone :)
Cheers buddy!!
Nisar 7 May 2014 11:02
Sorry to bother you again..I think I was wrong,now by using the above mentioned parameter it fetches all the entries of the set instead of the pipe separated list
Low 7 May 2014 11:04
Did you try the single quotes thing?
{exp:low_reorder:entries set="services" parse="inward" entry_id="{exp:stash:get name='datakwaliteit'}"}
Nisar 7 May 2014 11:05
Yes I did,but no result
Low 7 May 2014 11:07
Turn on template debugging and copy/paste all lines mentioning Low Reorder here, then.
Nisar 7 May 2014 11:13
I turned on template debugging and when saving the template I only see this
{exp:stash ...
No closing tag found. Note: some tags do not require closing.
Please consult the module's documentation if you experience problems.
Low 7 May 2014 11:16
If the template contains a Low Reorder Entries tag, then there should be a mention of it in the Template Debugger. This is on the front-end of your site; not in the CP.
Nisar 7 May 2014 11:19
Sorry my bad here we go
(0.072002 / 15.55MB) Calling Extension Class/Method: Low_reorder_ext/channel_entries_query_result
(0.128757 / 20.69MB) Calling Extension Class/Method: Low_reorder_ext/channel_entries_query_result
(0.145455 / 20.83MB) Calling Class/Method: Low_reorder/entries
(0.145806 / 20.84MB) -> Class Called: Low_reorder
(0.145955 / 20.84MB) Low Reorder: Retrieving set from database
(0.146655 / 20.85MB) Low Reorder: Getting ordered entry_ids from database
(0.148413 / 20.91MB) Low Reorder: Setting parameters status="open" channel="services" fixed_order="63|60|62|64|61|84"
(0.148430 / 20.91MB) Low Reorder: Calling the channel module
(0.152239 / 21.10MB) Calling Extension Class/Method: Low_reorder_ext/channel_entries_query_result
Low 7 May 2014 11:21
What's the exact opening Entries tag you have now? You can use http://pastie.org/ or http://pastebin.com/ for large chunks of code.
Nisar 7 May 2014 11:27
Please check all the expressions that I use in my template
http://pastie.org/9148588
Low 7 May 2014 11:32
First of all, use single quotes inside the entry_id="" parameter (line 38 of your code):
Also, try and make sure, when setting the Stash variable, all the values are on a single line. Remove all carriage returns from that piece of code, so everything inside the Stash tag is on a single line. Might also be achieved by the Stash's Append tag. As long as the actual output is on a single line.
Nisar 7 May 2014 12:24
I think its working now..so using Stash variable in a single line is the solution