[PHPTAL] tal:condition and element contents
Nick Pack
nick at carbidefinger.net
Fri Feb 29 11:21:13 CET 2008
For my current project, I have the need to display a form tag around
some elements if a condition is met, but maintaining the contents of the
element regardless of the condition. For example:
<form tal:condition="isAdmin">
<h1 tal:content="thisTitle">The Title</h1>
<input type="text" name="field" tal:attributes="value field" />
</form>
Is there a way that I can specify a parameter so that the elements
inside the form can still be shown but omit the form tag, so that if
condition isAdmin is not met, the above output will display as:
<h1 tal:content="thisTitle">The Title</h1>
<input type="text" name="field" tal:attributes="value field" />
Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.motion-twin.com/pipermail/phptal/attachments/20080229/cccd733e/attachment.htm
More information about the PHPTAL
mailing list