[Petal] Replace contents of tag only if value is set

Chris Croome chris@webarchitects.co.uk
Tue, 29 Oct 2002 11:53:17 +0000


Hi

On Tue 29-Oct-2002 at 12:42:07PM +0100, Holland, Mark wrote:
> > If I understand what you want to do, you shouldn't need a custom
> > handler.  Use a condition check like the following:
> > 
> > 	<tag petal:content="foo" petal:if="bar">Your Message
> > 	Here</tag>
> 
> Ok, but this condition only displays the tag if bar is true.  I
> want to be able to display the tag all the time and only replace
> the contents if foo is true.

How about this:

  <p
    petal:if="true:foo"
    petal:content="foo"
  >foo goes here if foo is true</p>

  <p
    petal:if="false:foo"
  >foo wan't true so bar is here</p>

Or am I missing something?

Chris

-- 
Chris Croome                               <chris@webarchitects.co.uk>
web design                             http://www.webarchitects.co.uk/ 
web content management                               http://mkdoc.com/   
everything else                               http://chris.croome.net/