[Radiant] if_content multiple parts (was if_content with inherit)

Jim Gay jim at saturnflyer.com
Tue Jul 8 13:18:45 CDT 2008


Sean, what do you think?

I think either

<r:if_content part="this, that" select="all"> #this being the default
<r:if_content part="this, that" select="any">

Or I'm thinking that inclusive="true" might be good since we've got  
mostly true/false for extra attributes on r:content

<r:content [part="part_name"] [inherit="true|false"] [contextual="true| 
false"] />
<r:if_content [part="part_name, other_part"]  [inherit="true|false"]  
[inclusive="true|false"]>
<r:unless_content [part="part_name, other_part"]  [inherit="true| 
false"] [inclusive="true|false"]>

inclusive="true" being the default (meaning AND)

Would either of those be clear to everyone?
I'd personally opt for the first (select="all") for clarity of meaning.

I'm tempted to shy away from all of this and create a new tag like  
<r:if_any_part part="one, two"> and <r:if_all_parts...> but I think  
that that will add more complexity in the long run. I don't think the  
answer is more tags. If the r:if_content chooses a reasonable default  
and provides an easy override with select="any" then communicating its  
use and purpose to users will be relatively simple.

On Jul 8, 2008, at 1:45 PM, Adam van den Hoven wrote:

> I have to agree with Tim in this. I'm traditionally bad at picking  
> names for things like attributes but I think that its critical that  
> the meaning be clear; Find and collect strike me as being ambiguous,  
> I though of require but that's overloading an important word.
>
> Adam
> On 8-Jul-08, at 10:25 AM, Tim Gossett wrote:
>
>>> Or better yet
>>> <r:if_content part="this, that" collect="all"> #this being the  
>>> default
>>> <r:if_content part="this, that" collect="any">
>>> Or
>>> <r:if_content part="this, that" find="all"> #this being the default
>>> <r:if_content part="this, that" find="any">
>>>
>>
>> This looks like the best solution to the AND / OR discussion.
>>
>> --
>> Tim


More information about the Radiant mailing list