Right now, because of radius parsing limitations, the syntax is actually:
<r:if cond="content exists?"> (same as: <r:if cond="content['body']
exists?">
And, of course you can also test:
<r:if cond="content blank?">
FWIW, I'm entertaining hacking into radius to allow my extension to
handle parsing for non-conforming tags so we can actually use a syntax like:
<r:if content exists?>
-Chris
Anton Aylward wrote:
Chris Parrish said the following on 09/23/2009 12:17 PM:
Anton Aylward wrote:
John W. Long said the following on 09/23/2009 11:20 AM:
I like this:
<r:if_blank part="my_part">
<r:unless_blank part="my_part">
Personally I am tired of the "if_XXXX"
and prefer the more generic simple "if" with some parameter.
It look more natural.
I suppose you all know where I stand on this. Anton, I use my
conditional tags extension
(http://github.com/SwankInnovations/radiant-conditional-tags-extension)
for just this reason. I can already do most (all?) of this now using it.
You mean
<r:if content['body'] exists? >
instead of <r:if_content>
and
<r:if content['body'] blank? ?
But then I'm biased, or rather I'm somewhere between lazy and stupid.
I'd rather learn a pattern instead of memorizing disparate rules.
And we don't need John's new code cos we can already do it in a much
cleaner manner.
But then I'm not in a job where my productivity is measured by the
amount of code I produce but rather by the solutions I deliver, and part
of that solution is ease of maintenance by people even lazier and more
stupid than me - often called "users".
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant