Is der anyway to sort the the results of nodes in ezflow manual blocks based on nodes attribute values

Is der anyway to sort the the results of nodes in ezflow manual blocks based on nodes attribute values

Monday 04 October 2010 12:21:39 am - 3 replies

Modified on Monday 04 October 2010 12:32:28 am by Romeo Antony

Author Message

Ivo Lukac

Monday 04 October 2010 4:02:07 am

If you want to automatically do something in block then it is not a manual block :)

Try making a custom block fetch class... Look in settings/block.ini and extension/ezflow/classes/fetches/* for examples

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Gaetano Giunta

Monday 04 October 2010 10:45:05 am

More: take care about the sorting of nodes in the results of your block fetch function: ezflow assumes items are to be sorted by the value of the 'ts_publication' value in the return array.

When this is not a publication date, things can get a little tricky, ie. you could use any ordered sequence of integers for sorting your items, but ezflow will still treat that value as a real timestamp, forgetting to update/show things with a date in the future, etc...

I've found the usage of custom blocks to be better: fetch and sort in the template, and you're done. Of course, this has an impact cache-wise.

Principal Consultant International Business
Member of the Community Project Board

Romeo Antony

Tuesday 05 October 2010 12:06:04 am

Thank you for your reply Gaetano,Ivo.

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.