Previous Chapter | Next Chapter | Up | Next Section | Contents

Returning Data using the dtml-return tag


The dtml-return tag is used to return data rather than text from a DTML method. It provides a way to use DTML methods to perform simple computation that can be used by other DTML methods and Zope objects. The only attributes supported by the dtml-return tag are the standard name and expr attributes.

 

Consider the following example:

blah blah

<dtml-return "1">

 

When this DTL method is executed, the number 1 is returned. The text "blah blah" is not returned. In:

<dtml-in objectIds>

<dtml-return sequence-item>

</dtml-in>

blah

 

If there are any object ids, then the first one is returned, otherwise, the DTML text, "blah" is returned.

Previous Chapter | Next Chapter | Up | Next Section | Contents