Friday 30 March 2012 11:48:27 am - 3 replies
Hi,
On my homepage, I have 2 blocks, each block containing X articles, how can I avoid duplicate articles across the 2 blocks?
Thanks for your help,
Best regards,
Jean-Luc.
Friday 30 March 2012 2:41:27 pm
Hi Jean-Luc,
I'm not sure that there's a clean way to do that, but if you want to keep it simple (& stupid), I would say that it could be done by overriding eZFlowPool::insertItems() and implemeting a piece of code that prevents the addition of a node which is already in a specified zone. A design/template approach could also hide or disable a node based on its current locations (within a zone).
As far as I'm concerned, I would go for the first solution if you don't need to display any warning to your contributor.
Arnaud
Modified on Friday 30 March 2012 2:42:16 pm by Arnaud Lafon
Friday 30 March 2012 3:21:58 pm
Hi,
I tried such things for a customer so far, using a template approach
in each block view template i added this piece of code:
{if $viewed_nodes|contains(concat('#', $valid_node.node_id, '#'))}
{continue}
{/if}
{set-block variable=$viewed_nodes scope='root'}{$viewed_nodes}#{$valid_node.node_id}#{/set-block}
Modified on Friday 30 March 2012 4:56:11 pm by Ousmane KANTE
You must be logged in to post messages in this topic!