I don't want to overload the URL tags conversation.

> Jim Gay wrote:
>>
>> Hmm. If it's going to go that way, I retract the suggestion. Why not
>> just add an attribute to if_content which checks the presence of text
>> then. <if_content part="my_part" blank="false|true">
>> And then inheritance would get tricky.

On Wed, Sep 23, 2009 at 9:13 AM, Sean Cribbs <seancri...@gmail.com> wrote:
> At one point, I believe it was for Con-way, I implemented an <r:if_blank>
> tag that checked whether a part was blank.  Regarding the syntax of Jim's
> proposal, it would be nice to disambiguate the 'blank' attribute - it's
> unclear to me what it would do in each case.  Maybe:
>
> <r:if_content part="my_part" allow_blank="true|false">
>
> Sean

What would everyone think about adding this, but altering the default
behavior so that if a page part is blank, it is considered not there.
So <r:if_content part="my_part" allow_blank="false"> would be your use
case to override and <r:if_content part="my_part"> would be the
default where allow_blank is assumed to be true.

Although now that I look at that, I'm not sure allow_blank is easy to
understand.
In pseudo-code, I'd want

if content, when not blank for the part X expand the contents of the tag

So maybe
<r:if_content part="my_part" check_for_text="false"> (the equivalent
of not checking to see if the content is blank)

The attribute should make sense, but I'd guess it's likely that it
won't be used often and that most uses would be the typical no-map
part for building site maps (where you would now be required to add
check_for_text="false").

Aside from the attribute name, my expectation for the behavior of the
tag would be that if inherit is set to true, and check_for_text is set
to true (the default) then Radiant would continue to look up the page
tree if the part does exist but has no text.

-- 
Jim Gay
http://www.saturnflyer.com
_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to