Hi Andrew,

Thanks for pointing me to John Long's posting.

Obviously we got stuck at the very same point.

We're actually touching the core concepts and values of radiant here.

Up to this point radiant is a clever way of assembling html tags in a
very defined way.
That's the very beauty of radiant.

Should we really open radiant up to constructs of a programming
language?
We'd open up a pandoras box.

There's a real value in radiant,
that it does *not* provide for direct scripting.

We should keep this value.
Some people might oppose.

I suggest to invent conditionals into radiant,
based on a very restricted context.

I believe such things can be done with in ruby.
That would be like an internal sandbox.




















On 8 Mai, 16:19, Andrew Neil <andrew.jr.n...@gmail.com> wrote:
> 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-condi...
>
> 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