Forums / Setup & design / include attribute in a template

include attribute in a template

Author Message

Joël LEGER

Monday 09 March 2009 1:32:27 am

Hi,

i have a basic question, i created a class content with attributes (Collect Information), one of them is a selection with option .
The form works fine but i would like to use this attibute as a filter for a list in another template, how can i include it ?

Fátima Chapri

Monday 09 March 2009 2:59:07 pm

Hi jo leg,

How about a fetch list with the "attribute_filter" parameter. You'll be able to fetch a set of nodes where an attribute contains some specific data. Filtering on the attribute level is supported the datatype you have.

Have a look at this link: ez.no/doc/ez_publish/technical_manual/3_9/reference/modules/content/fetch_functions/list

eZ debug

Timing: Jan 18 2025 19:12:57
Script start
Timing: Jan 18 2025 19:12:57
Module start 'content'
Timing: Jan 18 2025 19:12:58
Module end 'content'
Timing: Jan 18 2025 19:12:58
Script end

Main resources:

Total runtime0.6852 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.0098 587.7266180.8359
Module start 'content' 0.00980.6716 768.5625462.1484
Module end 'content' 0.68130.0038 1,230.710942.1094
Script end 0.6851  1,272.8203 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.4414140.0002
Check MTime0.00130.1903140.0001
Mysql Total
Database connection0.00360.524710.0036
Mysqli_queries0.650094.8670550.0118
Looping result0.00040.0651530.0000
Template Total0.652395.220.3262
Template load0.00190.283520.0010
Template processing0.650494.923920.3252
Template load and register function0.00040.061110.0004
states
state_id_array0.00130.192510.0013
state_identifier_array0.00100.151020.0005
Override
Cache load0.00160.2295100.0002
Sytem overhead
Fetch class attribute can translate value0.00050.077720.0003
Fetch class attribute name0.00150.221020.0008
XML
Image XML parsing0.00020.032520.0001
class_abstraction
Instantiating content class attribute0.00000.000920.0000
General
dbfile0.00070.1047120.0001
String conversion0.00000.001030.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
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 8
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs