> > 
> >    I would suggest to add the parameters individually to 
> the <r:snippet>
> > tag, and to allow a body to be defined:
> > 
> >    <r:snippet name="rounded-box" class="whatever" bg-color="blue">
> >         This is a parametrized snippet...
> >    </r>
> > 

Basically, featurewise it looks like what you're after is a templating
language like freemarker (http://freemarker.org). Radius (the templating 
language used by radiant) reminds me a lot of the very early versions of 
freemarker. Freemarker macros map conceptually to radius snippets and 
layouts.

Problem is that freemarker is a java library, so not much use to Radiant
as is, but it's probably a good place to look for thinking of ways to 
extend radius.

I've actually been doing some thinking about ripping out and replacing 
radiant (or at least modularising it) lately. 

Ideally, I'd love to be able to just write ERB in radiant... which would
be fine for just me running radiant for myself on my own server - and in
fact backdoor basically lets me do that, but it's hardly a bright idea
from a security point of view.

Basically, my current thoughts are to create a 'safe erb' - ideally
running using _why's sandbox, but should be almost as good running 
under a $SAFE=4 thread. The core active-record objects would need
to be wrapped up in a method-filtering proxy and then handed off
to the page content as an erb script to render as it wants.

Note that this is all just thoughts at the moment... the road to
implementing such a beast would be quite tough - it's not something
that could be done incrementally, which means the odds of me dedicating
enough time to do it is fairly slim, but thought I'd throw this out
there to get peoples hopes up.

Dan.
_______________________________________________
Radiant mailing list
Post:   [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to