[Radiant] if_content multiple parts (was if_content with inherit)
Chris Parrish
chris.parrish-forummail at swankinnovations.com
Tue Jul 8 20:08:31 CDT 2008
Jim Gay wrote:
> On Jul 8, 2008, at 8:16 PM, Chris Parrish wrote:
>
>> Since the all / find / require_all / inclusive attribute is both
>> required and boolean (yeah I know XOR's been mentioned but I'm not
>> going there), why not try to include that condition in the rest of it
>> somehow?
>>
>> <r:if_content part="my part"> (notice that the name "part" is singular)
>> <r:if_content any_part="my part, my other part">
>> <r:if_content all_parts="my part, my other part">
>>
>> So in this example, you'd have 3 different possible attributes. Its
>> always easier to read one attribute name than to have to combine two
>> or three into a single meaning.
>>
>> This stuff really is really motivating me to get my conditionals
>> extension back to life ;-)
>>
>> -Chris
>
> What do you do when more than one of those is used?
Well certainly you'd require only one of those attributes but that's not
terribly hard logic. I see it as something akin to tags requiring an
attribute and giving an error if the user leaves it out.
> I'm just going to work on any="true" and call it a day (I can always
> tweak the code to do differently). This conversation was helpful.
> Ultimately as long as its implemented in a way that makes sense and it
> gets the necessary feature built I think it will be a success.
> When it comes down to it I'm not on the core team so they'll decide.
> But I wanted to get the community involved in the idea first before I
> added it.
No worries. It's yours to build.
-Chris
More information about the Radiant
mailing list