Tuesday 08 July 2008 6:28:43 am
Hi,
I have the following problem with ezFlow dynamic blocks: when i add a dynamic block and press 'choose source' for the first time, all works great. When i want to change the source node of the block, even if i press 'choose source' and choose a new source node, the items of the block remain the same (nothing changes except the name of the source on the right top corner of the block). After some testing i found a solution for my problem. I did some changes to ezflowlatestobjects.php, but i am not sure if these changes won't affect the work of rotation and overflow mechanisms of the extension, since i don't use them for now. My changes are mainly related to 'AttributeFilter' parameter, since the fetches in the script returned always NULL. Now i only check for objects that are published before current timestamp (today) and sort them by priority. I removed the check for objects being published after the last update of block (block['last_update']). First on line 36 i removed the whole block:
$node = eZContentObjectTreeNode::fetch( $nodeID, false, false ); // not as an object
if ( $node && $node['modified_subnode'] <= $publishedAfter )
{
return array(); } and left only the line: $nodeID = $parameters['Source']; Second i removed line 53: array( 'published', '>', $publishedAfter ) and left only the second part - array( 'published', '<=', $publishedBeforeOrAt ). Now my 'AttributeFilter' is like:
$subTreeParameters['AttributeFilter'] = array(
'and',
array( 'published', '<=', $publishedBeforeOrAt ) ); So that solved the problem for now, but i would like to ask if anybody had the same problem and maybe a better solution to it! Thanks in advance :)
Iguana IT - http://www.iguanait.com
|