Ok, you're right. For me, <r:if content exists?> would not feel right, though.
Manuel On Sat, Oct 25, 2008 at 8:35 PM, Chris Parrish <[EMAIL PROTECTED]> wrote: > Manuel Meurer wrote: >>>> >>>> I think that there is a place for these tags and I'd love it if there >>>> was >>>> an easy way to use this to create both if_ and unless_ tags. Something >>>> like: >>>> >>>> conditional_tags "my_tag" do |tag| >>>> #return a boolean >>>> false >>>> end >>>> >>>> which would then create if_my_tag and unless_my_tag tags. For the if_ >>>> tag, >>>> the contents of the tag is executed when block returns true, and the >>>> reverse >>>> happens for the unless_ tag. >>>> >>> >>> This is interesting. I'll have to think about this. Essentially what >>> you're going for here is the removal of the attributes (something I agree >>> with). I bet my extension would be more comfortable if only you could >>> write: >>> >>> <r:if content exists?> >>> >> >> This would not be valid XML. >> Attributes must have a value. >> http://www.w3.org/TR/xml/#attdecls >> >> Manuel >> _______________________________________________ >> Radiant mailing list >> Post: Radiant@radiantcms.org >> Search: http://radiantcms.org/mailing-list/search/ >> Site: http://lists.radiantcms.org/mailman/listinfo/radiant >> > > Radius isn't really xml -- it just eerily *looks* like xml. For example, > Radius will allow all kinds of characters in the tag that XML doesn't > permit. > > And that's fine. We aren't really marking up the document structurally > we're just borrowing a familiar notation for a templating language. > > I see no reason we couldn't create, say, a php-radius tag extension that > parsed: <? snippet name="my snippet" ?> as a snippet tag. Or maybe ERB's > <%%> > > > I really wasn't proposing changing radius there (though I am intrigued by > the above). Instead I was looking at how the pattern of xml can make radius > tags less comprehensible. Round peg, square hole in some cases. > > Another example would be creating if, else if, else structures. I don't see > how you could use an xml-like notation to pull that off. Lucky for us, > if-then is plenty sufficient for 99.99% of all the needs for Radiant users. > > -Chris > _______________________________________________ > Radiant mailing list > Post: Radiant@radiantcms.org > Search: http://radiantcms.org/mailing-list/search/ > Site: http://lists.radiantcms.org/mailman/listinfo/radiant > _______________________________________________ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant