Forums / Developer / Problem with tables in pdf templates

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

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?