Path

ez.no / ezpublish / documentation / customization / tips & tricks / debugging templates


Debugging templates

These documentation pages are no longer maintained. Please visit the new documentation site.

The template operator attribute can be used to generate a list of attributes from a template variable. You do that by:

{$myvariable|attribute}

i.e.

<br>module_result.content

{$module_result.content|attribute(show, 1)}

<br>node

{$node|attribute(show, 1)}

<br>node.data_map

{$node.data_map|attribute(show, 1)}

<br>node.object

{$node.object|attribute(show, 1)}

<br>DesignKeys:used

{$DesignKeys:used|attribute(show, 1)}

This will generate a HTML table with all the attributes and their types. If a type is an array or a new object with attributes it will recursively display those as well until it has displayed 2 levels.

Options

By supplying show as the first parameter you get the values of the attributes.

The second parameter determines how many levels it will expand, the default is 2.
A value of false() means there is no level limit, this can cause the web server to crash if there are infinite loops in the attributes.

The third controls whether the output should be in HTML or not. Pass false() to it to get text output.

Comments

Contents

Customization

Access control
eZ publish API Documentation
Content structure
Custom design
Components
Tips & Tricks
    Debugging templates
    Javascript in templates
    Fetching current user
    Showing related objects
    Show which templates are used
    Fetching the ID of the parent
    One Article Folder
    Creating tree menus
    How can I use my own php script insid...
    Hiding attribute content
    Splitting an article over several pages
    Accessing section id in pagelayout
    List articles in folder
    Creating nice URLs
    Alt tag on images
    Improve the pagelayout.tpl
    Clean HTML tags
    Insert javascript call inside ezpub d...
    3rd party applications
    Fetch Function examples
    Display more than 15 items on your co...
    Including PHP files in templates
    Redirecting after content publishing
    HowTo see if article has an image
    Date and Time Formats
    Forms processing example: store user...
    Adjust Timezone
    Adding a Remove Button/Image
    Find the age in years for an object
    Editing, creating and removing conten...
    Indexing binary files with IFilters o...
Troubleshooting


Created

14/04/2003
5:27:09 pm
by Jan Borsodi

Last updated

08/07/2003
2:27:23 pm
by Tony Wood

Authors

Jan Borsodi
Bård Farstad
Tony Wood



This page is part of the eZ Publish documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.