On Wed, Sep 23, 2009 at 11:24 AM, Mohit Sindhwani <t...@onghu.com> wrote:
> John W. Long wrote:
>>
>> On Sep 23, 2009, at 10:53 AM, Andrew vonderLuft wrote:
>>>
>>> As info, these are the tags Sean mentioned:
>>>
>>>  tag 'if_blank' do |tag|
>>>   ...
>>>  end
>>>
>>>  tag 'unless_blank' do |tag|
>>>   ...
>>>  end
>>
>> I like this:
>>
>> <r:if_blank part="my_part">
>> <r:unless_blank part="my_part">
>>
>> The current semantics of if_content are nice because you can leave a part
>> blank to intentionally get it not to render. If you only had if_blank, there
>> is no way to get that behavior.
>
> I like that - cos I use the current method to intentionally get it to not
> render a page!
>

I don't like the if/unless_blank tags when we could do this with if_content.

I tried to keep the conversation on point about URL tags so I started
another thread, but here's my comments about this:
---
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.
_______________________________________________
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