fetch content list

Author Message

David Santiso

Friday 17 June 2011 12:59:31 am

Hi,

How can I fetch content list filtering by owner content?

I've copied this for documentation:

{def $u_current=fetch( 'user', 'current_user' )}

{def $a_content=fetch( 'content', 'list',
    hash( 'parent_node_id', array( 165, 167 ),
    'attribute_filter', array( 'owner', '=', $u_current.contentobject_id ),
    'sort_by', array( 'modified', false() ),
    'ignore_visibility', false(),
    'limit', 5 ) )}

... but it displays nothing.

If I don't put the "attribute_filter", it displays the content of all users.

Thanks,

David

Thiago Campos Viana

Saturday 18 June 2011 7:39:38 pm

Try with an array inside another array, like in (you also could use 'and'/'or'):

...
'attribute_filter', array(array( 'owner', '=', $u_current.contentobject_id)),
...

eZ Publish Certified Developer: http://auth.ez.no/certification/verify/376924

Twitter: http://twitter.com/tcv_br

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 02:59:15
Script start
Timing: Jan 18 2025 02:59:15
Module start 'layout'
Timing: Jan 18 2025 02:59:15
Module start 'content'
Timing: Jan 18 2025 02:59:16
Module end 'content'
Timing: Jan 18 2025 02:59:16
Script end

Main resources:

Total runtime0.9257 sec
Peak memory usage4,096.0000 KB
Database Queries55

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 591.4297152.6094
Module start 'layout' 0.00590.0026 744.039139.4375
Module start 'content' 0.00850.9158 783.4766529.1484
Module end 'content' 0.92430.0014 1,312.62508.1875
Script end 0.9257  1,320.8125 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.3371160.0002
Check MTime0.00130.1437160.0001
Mysql Total
Database connection0.00080.082310.0008
Mysqli_queries0.884795.5678550.0161
Looping result0.00040.0449530.0000
Template Total0.894796.720.4474
Template load0.00170.186120.0009
Template processing0.893096.466520.4465
Template load and register function0.00010.014210.0001
states
state_id_array0.00130.136610.0013
state_identifier_array0.00120.131020.0006
Override
Cache load0.00140.1468160.0001
Sytem overhead
Fetch class attribute can translate value0.00050.048620.0002
Fetch class attribute name0.00100.103030.0003
XML
Image XML parsing0.00060.059820.0003
class_abstraction
Instantiating content class attribute0.00000.000830.0000
General
dbfile0.00090.0919160.0001
String conversion0.00000.000740.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs