Problem with tables in pdf templates

Author Message

Kim Bjurling

Wednesday 10 August 2011 5:57:54 am

I want to create a table with animal names and the animals age. I have tried to create a table with pdf table function, but i can't make this work. This is my code so far

"

{def $animal = fetch('content', 'list', hash('parent_node_id', 34'))}
{def $table_rows =''}

{set-block variable=$table_rows}
  <tr>
    <td>{pdf( 'text', $animal.name|wash( 'pdf' ))}</td>
  </tr>
  <tr>
    <td>{pdf($animal.data_,map.age.content|wash(pdf))}</td>
  </tr>
{/set-block}
{pdf(table, $table_rows, hash('showLines',2) )}

 

"

The code is located in a overrride template, main.tpl. That happends when i run this code it just return blank,  nothing happends. I don't understand what the problem is. Any ideas?

Edit: Does the table function only works with data that comes from a xmlblock?

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

Main resources:

Total runtime0.6276 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 589.0547152.6250
Module start 'layout' 0.00480.0034 741.679739.4531
Module start 'content' 0.00820.6176 781.1328408.8828
Module end 'content' 0.62580.0017 1,190.01568.1563
Script end 0.6275  1,198.1719 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.5845160.0002
Check MTime0.00150.2455160.0001
Mysql Total
Database connection0.00070.104910.0007
Mysqli_queries0.585793.3230460.0127
Looping result0.00040.0674440.0000
Template Total0.597095.120.2985
Template load0.00270.432620.0014
Template processing0.594394.701020.2971
Template load and register function0.00020.032710.0002
states
state_id_array0.00070.114910.0007
state_identifier_array0.00090.146320.0005
Override
Cache load0.00230.3621190.0001
Sytem overhead
Fetch class attribute can translate value0.00130.200410.0013
Fetch class attribute name0.00080.119810.0008
XML
Image XML parsing0.00010.022610.0001
class_abstraction
Instantiating content class attribute0.00000.000610.0000
General
dbfile0.00070.1158100.0001
String conversion0.00000.001440.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
1content/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
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 10
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs