You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Colin Chalmers <co...@maxware.nl> on 2002/10/31 11:54:38 UTC

using #set more than once

Hi,

I'm building an Index screen using Turbine. In the template I have a #set statement for building a "href" which will guide the user to the next page. However it appears that I can't re-use the info from #set more than once. If I use the example below only the first href contains the required $Hlink.

What am I doing wrong?

/c

Example

 #set ($Hlink = $link.setPage("FooForm.vm").addPathInfo("$foo1Name", $foo.value())

 #foreach ($Entry in $Entries)
 
  <td>
   <a class="inginverted" href="$Hlink"></a>
  </td>
   
  <td>
   <a class="inginverted" href="$Hlink"></a>
  </td>
#end

Re: using #set more than once

Posted by Colin Chalmers <co...@maxware.nl>.
Works thx

/c

----- Original Message -----
From: "Denis" <ji...@respublica.fr>
To: "Velocity Users List" <ve...@jakarta.apache.org>
Sent: Thursday, October 31, 2002 12:31 PM
Subject: Re: using #set more than once


> Try:
>
> #set ($Hlink = "$link.setPage('FooForm.vm').addPathInfo($foo1Name,
> $foo.value())")
>
> If you still have problems, there is a specific list for Turbine issues.
> -- Denis.
>
> On Thursday, October 31, 2002, at 10:54 AM, Colin Chalmers wrote:
>
> > Hi,
> >
> > I'm building an Index screen using Turbine. In the template I have a
> > #set statement for building a "href" which will guide the user to the
> > next page. However it appears that I can't re-use the info from #set
> > more than once. If I use the example below only the first href
> > contains the required $Hlink.
> >
> > What am I doing wrong?
> >
> > /c
> >
> > Example
> >
> >  #set ($Hlink = $link.setPage("FooForm.vm").addPathInfo("$foo1Name",
> > $foo.value())
> >
> >  #foreach ($Entry in $Entries)
> >
> >   <td>
> >    <a class="inginverted" href="$Hlink"></a>
> >   </td>
> >
> >   <td>
> >    <a class="inginverted" href="$Hlink"></a>
> >   </td>
> > #end
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: using #set more than once

Posted by Denis <ji...@respublica.fr>.
Try:

#set ($Hlink = "$link.setPage('FooForm.vm').addPathInfo($foo1Name, 
$foo.value())")

If you still have problems, there is a specific list for Turbine issues.
-- Denis.

On Thursday, October 31, 2002, at 10:54 AM, Colin Chalmers wrote:

> Hi,
>
> I'm building an Index screen using Turbine. In the template I have a 
> #set statement for building a "href" which will guide the user to the 
> next page. However it appears that I can't re-use the info from #set 
> more than once. If I use the example below only the first href 
> contains the required $Hlink.
>
> What am I doing wrong?
>
> /c
>
> Example
>
>  #set ($Hlink = $link.setPage("FooForm.vm").addPathInfo("$foo1Name", 
> $foo.value())
>
>  #foreach ($Entry in $Entries)
>
>   <td>
>    <a class="inginverted" href="$Hlink"></a>
>   </td>
>
>   <td>
>    <a class="inginverted" href="$Hlink"></a>
>   </td>
> #end


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>