Help with displaying custom content

Author Message

Lance Leger

Thursday 29 May 2003 12:00:41 am

I'm trying to list only articles that have the enable_highlight checkbox
attribute checked on a custom template.

{let $array_from_fetch = fetch( 'content', 'list', hash(parent_node_id, $node.node_id, class_filter_type, "include", class_filter_array, array(2)))}
{section name=Child loop=$array_from_fetch}
{section show=eq($Child:item.data_map.enable_highlight,"1")}
{node_view_gui view=line content_node=$Child:item}
{/section}
{/section}

This returns nothing... Any suggestions?

Thanks!

Paul Forsyth

Thursday 29 May 2003 4:24:57 am

lance,

look at the contents of your enable_highlight checkbox by trying:

{$Child:item.data_map.enable_highlight|attribute(show)}

$Child:item.data_map.enable_highlight is an object i believe so comparing it with an int like "1" will not work. However, that object has attributes which you can then test against. I can't remember off hand but it might be something like $Child:item.data_map.enable_highlight.data_int... check the result from the show command above and put in the right check.

Paul

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 30 2025 21:19:59
Script start
Timing: Jan 30 2025 21:19:59
Module start 'layout'
Timing: Jan 30 2025 21:19:59
Module start 'content'
Timing: Jan 30 2025 21:19:59
Module end 'content'
Timing: Jan 30 2025 21:19:59
Script end

Main resources:

Total runtime0.0219 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 588.2500151.2266
Module start 'layout' 0.00480.0033 739.4766220.7031
Module start 'content' 0.00820.0122 960.1797997.6797
Module end 'content' 0.02040.0015 1,957.859429.9922
Script end 0.0219  1,987.8516 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002410.9139140.0002
Check MTime0.00104.5534140.0001
Mysql Total
Database connection0.00052.322910.0005
Mysqli_queries0.002511.499330.0008
Looping result0.00000.045710.0000
Template Total0.00114.910.0011
Template load0.00083.654710.0008
Template processing0.00031.222910.0003
Override
Cache load0.00062.527510.0006
General
dbfile0.00115.056080.0001
String conversion0.00000.032640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs