If "slots" is a Map object, try:
$slots.get("foo")
"Robert Huffstedtler" <[EMAIL PROTECTED]> wrote on 10/27/2008
09:27:26 AM:
> Hi folks -
>
>
>
> I am helping a group migrate some content from Coldfusion to Velocity.
> In their CF code, they have a custom tag which they use in individual
> pages for grouping commonly used page variables into a pseudo-object
> before passing it off to the page wrapper. The model is very similar to
> the use of the VelocityLayoutServlet, so that's the direction I'm going
> for the migration.
>
>
>
> However, trying to set properties on a VTL identifier does not seem to
> work if the identifier does not reference an object. The documentation
> does not make it clear that that is a requirement
> (http://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html
> #references). The description of properties implies that one can
> associate a VTL identifier with a hashtable, but there aren't clear
> directions for doing so.
>
>
>
> Putting this -
>
>
>
> #set ( $slots.foo = "Foo")
>
>
>
> In my index.vm and referencing it like this in my Default.vm:
>
>
>
> $slots.foo<br/>
>
>
>
> Is just resulting in $slots.foo being output as a literal.
>
>
>
> Can someone point me in the right direction here?
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]