That's a good idea, and I agree that it would be an improvement. John
Long made a similar proposal on his blog a while back:

    
http://wiseheartdesign.com/articles/2010/03/11/proposal-generic-conditionals-for-radiant-cms/

I don't know whether the proposal has been implemented, but perhaps
someone else on the list could say.

Cheers,
Drew


On Thu, May 5, 2011 at 11:23 PM, eiked <e...@snafu.de> wrote:
> I'd like to propose an improvement to the way radiant handles
> conditionals.
>
> Currently we have a lot of diverse <r:if_something> and corresponding
> <r:unless_something> tags.
>
> I'd like to make a proposal how this can be improved.
>
> The first step would be to consolidate if/else into a container like:
> <r:condition_something>
>  <r:if>render something if the condition is true</r:if>
>  <r:else>render something else if the condition is false</r:else>
> </r:condition_something>
>
> The next step would be to unify the conditons:
>
> <r:condition if="some condition">
>  <r:if>render something if the condition is true</r:if>
>  <r:else>render something else if the condition is false</r:else>
> </r:condition>
>
>
> So we need to come up with some expression language to formulate those
> conditions.
>
> Maybe something like:
>    <r:condition if="r:parent"/>
> instead of <r:if_parent/>
>
> You get the idea.
>
>
>
>
>

Reply via email to