[Radiant] if_content with inherit

Jim Gay jim at saturnflyer.com
Tue Jul 8 13:24:34 CDT 2008


On Jul 8, 2008, at 2:11 PM, Tim Gossett wrote:
> On Tue, Jul 8, 2008 at 12:16 PM, Jim Gay <jim at saturnflyer.com> wrote:
>
>>
>> <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">
>>
>
> When I see "collect," I expect an array to be returned. I think  
> "find" is
> the way to go. Even though find(:all) and find_all_by_* return an  
> array, I
> think it's a little more clear than "collect."

I missed this before I sent my reply.
Something like this seems most reasonable to me, but keep in mind that  
all users aren't familiar with ActiveRecord finders.
I have my somewhat-technical users using things like r:if_content with  
ease.
The code <r:if_content part="this, that"> is very quickly understood  
to mean "if these parts are found..."
If I tell users that they could now say "if any of these parts..." or  
"if all of these parts..." I expect it would be a very short learning  
curve.


More information about the Radiant mailing list