Is ezflow working ?

Author Message

Sébastien Antoniotti

Sunday 08 June 2008 10:45:39 am

Hi,

After a complete day to try to make works eZ Flow, I'm asking me if eZ Flow is complete !

I just want to use overflow rules between two dynamic blocs who will display the same content (articles).

The first block will have 4 items visibles, and the second block will display 10 item. So I would like the first block to display articles 1 to 4, and the second block to display articles 5 to 14.

So I have defined my blocks like this :

[block2]
Name=block2
NumberOfValidItems=10
NumberOfArchivedItems=0
ManualAddingOfItems=disabled
FetchClass=fetcharticles
FetchParameters[]
FetchParameters[Source]=nodeID
FetchParameters[Class]=Class
# Single / Multiple
FetchParametersSelectionType[Source]=single
FetchParametersSelectionType[Class]=multiple
FetchParametersIsRequired[]
# True / False
FetchParametersIsRequired[Source]=true
FetchParametersIsRequired[Class]=true
ViewList[]=vue_liste
ViewName[vue_liste]=Vue liste


[block1]
Name=block1
NumberOfValidItems=4
NumberOfArchivedItems=0
ManualAddingOfItems=disabled
FetchClass=fetcharticles
FetchParameters[]
FetchParameters[Source]=nodeID
FetchParameters[Class]=Class
# Single / Multiple
FetchParametersSelectionType[Source]=single
FetchParametersSelectionType[Class]=multiple
FetchParametersIsRequired[]
# True / False
FetchParametersIsRequired[Source]=true
FetchParametersIsRequired[Class]=true
ViewList[]=vue_liste
ViewName[vue_liste]=Vue liste

The fetcharticles class returns the articles ordered by publication date DESC, without limit.

Then, I added the two blocks into my zone, set the parameters and selected block2 into the overflow dropdown of the block1.

But I have the same content into the blocks, even if I run the ezflow cronjob...

I'm going to became crazy with eZ Flow =(

Thanks in advance for your help !

eZ Publish Freelance
web : http://www.webaxis.fr

Bin LIU

Monday 09 June 2008 4:01:00 am

Hi,

I think you can fetch 14 article in the first block with NumberOfValidItems 4, and then, the reste 10 article will auto added into the second block.
In this case, you must create a FetchClass with .
Like this :

[block1]
Name=block1
NumberOfValidItems=4
NumberOfArchivedItems=0
ManualAddingOfItems=disabled
FetchClass=fetcharticles
FetchFixedParameters[]
FetchFixedParameters[Class]=article
FetchParameters[]
FetchParameters[Source]=nodeID
FetchParameters[Depth]=2
#this return 14 articles, so 10 article will added into the block 2 !!!!!!!!!!!!!!!!!!!!!!!!!
FetchParameters[Limit]=14
FetchParametersSelectionType[Source]=single
FetchParametersIsRequired[]
FetchParametersIsRequired[Source]=true
FetchParametersIsRequired[Depth]=true
FetchParametersIsRequired[Limit]=true
ViewList[]=ttt
ViewName[ttt]=tttttt
#Time for change the block after the crontab ezflow passed.
TTL=1800

Good luck

=== Lagardère Active ===

Fetch random
http://projects.ez.no/la_fetch_random
LA Static Cache
http://projects.ez.no/lastaticcache
LA Bookmarks (jquery)
http://projects.ez.no/labookmark
LA Calendar (jquery)
http://projects.ez.no/lacalendar

My site ez
http://lingping.info

Sébastien Antoniotti

Monday 09 June 2008 10:41:31 am

Hi Bin,

Thanks a lot for your help, I've tried your solution but it doesn't works.

Using your solution, did I still have to declare the block 2 like into my precedent post or I need to change something also into his declaration ?

Cheers,
Seb.

eZ Publish Freelance
web : http://www.webaxis.fr

Bin LIU

Monday 09 June 2008 2:21:34 pm

yes, you should create the second block empty, by example block manual with NumberOfValidItems=10. and config the first block overflow the second

your fetch class should be something like this :

class fetcharticles extends eZFlowFetchInterface
{
    function fetch( $parameters, $publishedAfter, $publishedBeforeOrAt )
    {
        if ( isset( $parameters['Source'] ) )
        {
            $nodeID = $parameters['Source'];
            $node = eZContentObjectTreeNode::fetch( $nodeID, false, false ); // not as an object
        }
        else
        {
            $nodeID = 0;
        }

        $subTreeParameters = array();
        $subTreeParameters['AsObject'] = false;
        $subTreeParameters['SortBy'] = array( 'published', true );

        /****************this is the last 14 article****************/
        $subTreeParameters['Limit'] = isset( $parameters['Limit'] ) ? $parameters['Limit']:false;
        $subTreeParameters['Depth'] = isset( $parameters['Depth'] ) ? $parameters['Depth']:false;

        if ( isset( $parameters['Class'] ) )
        {
            $subTreeParameters['ClassFilterType'] = 'include';
            $subTreeParameters['ClassFilterArray'] = explode( ';', $parameters['Class'] );
        }

       $result = eZContentObjectTreeNode::subTreeByNodeID( $subTreeParameters, $nodeID );
        $fetchResult = array();
        foreach( $result as $item )
        {
            $fetchResult[] = array( 'object_id' => $item['contentobject_id'],
                                    'node_id' => $item['node_id'],
                                    'ts_publication' => $item['published'] );
        }

        return $fetchResult;
    }
}

I wish it works for you

=== Lagardère Active ===

Fetch random
http://projects.ez.no/la_fetch_random
LA Static Cache
http://projects.ez.no/lastaticcache
LA Bookmarks (jquery)
http://projects.ez.no/labookmark
LA Calendar (jquery)
http://projects.ez.no/lacalendar

My site ez
http://lingping.info

Sébastien Antoniotti

Tuesday 10 June 2008 1:26:39 pm

It works!

Thank you very much for your help, I was really blocked!

With your advice and the latest version of svn extension, everything is back in order.

All apologies to the developers team for having doubted eZ Flow;)

eZ Publish Freelance
web : http://www.webaxis.fr

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

eZ debug

Timing: Jan 18 2025 04:30:54
Script start
Timing: Jan 18 2025 04:30:54
Module start 'layout'
Timing: Jan 18 2025 04:30:54
Module start 'content'
Timing: Jan 18 2025 04:30:54
Module end 'content'
Timing: Jan 18 2025 04:30:54
Script end

Main resources:

Total runtime0.2474 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0095 587.9375152.6250
Module start 'layout' 0.00950.0059 740.562539.4453
Module start 'content' 0.01530.2299 780.0078583.5703
Module end 'content' 0.24520.0021 1,363.578120.1641
Script end 0.2474  1,383.7422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00381.5456160.0002
Check MTime0.00140.5534160.0001
Mysql Total
Database connection0.00150.590610.0015
Mysqli_queries0.161065.0660650.0025
Looping result0.00100.3938630.0000
Template Total0.185775.120.0928
Template load0.00230.933320.0012
Template processing0.183474.115720.0917
Template load and register function0.00010.052110.0001
states
state_id_array0.00220.879210.0022
state_identifier_array0.00200.798220.0010
Override
Cache load0.00210.8425630.0000
Sytem overhead
Fetch class attribute can translate value0.00060.247920.0003
Fetch class attribute name0.00190.783770.0003
XML
Image XML parsing0.00130.521720.0006
class_abstraction
Instantiating content class attribute0.00000.0114100.0000
General
dbfile0.00200.8186210.0001
String conversion0.00000.004140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 27
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs