On Sat, Jul 10, 2010 at 12:10 PM, Wes Gamble <we...@att.net> wrote:
> All,
>
> In the Radiant ethic, it states: " Radiant is primarily designed for static
> Web sites (that is, sites that are not dynamically generated). It is not,
> and should not become, portal software."
>
> I was under the assumption that snippets were roughly equivalent to Rails
> partials, and assumed that snippets could take local data as input just like
> partials, but this doesn't appear to be the case, based on the snippet
> documentation at http://wiki.github.com/radiant/radiant/snippets and the
> quote above.
>
> I'd just like to verify: Can one pass variable data "into" a snippet and
> have it evaluated at runtime in any way?

you can `yield` inside of snippets which allows for some sort of
"variable data". for example:

snippet "x": <div id="content"><r:yield/></div>

usage:
<r:snippet name='x'>
 <r:if_url matches='^/$'><r:find url='/about'><r:content/></r:find></r:if_url>
 <r:unless_url matches='^/$'><r:content/></r:unless_url>
</r:snippet>

Reply via email to