Shuffle works only with fetch blocks?

Author Message

Denitsa M.

Tuesday 09 August 2011 3:28:15 am

Hello,

I need a manual adding items block, in which to put N items, show X of them (X < N) with shuffling. I want to use the shuffle ability of ezflow, but it seems not to be working in manual block. So I assume shuffle is working only when block uses fetch from settings, is that correct, or there is any way to use the shuffle with manual blocks too and set the valid_nodes as a random array of X items out of N?

Iguana IT - http://www.iguanait.com

Felix Laate

Tuesday 09 August 2011 4:41:59 am

You could use a shuffle operator. Add e.g. the http://projects.ez.no/swark_for_ez_publish_4 extension, and then use the shuffle operator to randomize the order of the $valid_nodes array.

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

Denitsa M.

Tuesday 09 August 2011 4:56:14 am

Thank you for your reply, but my meaning is exactly not to use any operator in templates. It is pointless system to return all N items into the valid_nodes array, when it can return only X items; imagine if N is 100 and X is 3, then this is just a waste of resources. If it was up to an operator usage, you do not even need an extra extension to do this with template code.

Iguana IT - http://www.iguanait.com

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