[Zope] ZPT - conditional metal:define-slot

Max M maxm@mxm.dk
Sun, 02 Feb 2003 22:59:21 +0100


I have a template (Only relevant parts here)

            <td width="20%" bgcolor="#CCCCCC">
                <div metal:define-slot="leftColumn">leftColumn</div>
            </td>
            <td width="60%" bgcolor="#FFFFFF">
                <div metal:define-slot="primary">primary content</div>
            </td>
            <td width="20%" bgcolor="#FFFFFF">
                <div metal:define-slot="secondary">secondary content</div>
            </td>

Wich I call like:

<div metal:fill-slot="leftColumn">
Lef content
</div>

<div metal:fill-slot="primary">
primary content
</div>

<div metal:fill-slot="secondary">
secondary content
</div>


But I would really like the "secondary" column/td to be optional. So 
that if I don't have any content for it, it will no be there.

Does anybody have a clue as for the best way to do something like this?

regards Max M