You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Kevin Clark <kc...@virtumundo.com> on 2001/08/09 22:56:27 UTC

Getting the name of the current template

Thanks for the help this morning. I've got another...

I need to grab the name of the current template and put it into a link;
specifically, so the same content will be shown after a login/logout.
Currently, my logout links looks like this:

<a href="$link.setPage( $data.getScreenTemplate() )
.setAction("user.LogoutUser")">Logout</a>

The basic idea is to show the same page, and execute the LogoutUser
action...

however, when the current template is in a subdirectory of
...templates/screens/, such as templates/screens/foo/[name].vm, the
parameters get screwed up:

http://myserver/name/servlet/name/template/*foo*/name.vm/action/user.LogoutU
ser

So, turbine looks for "foo" instead of "foo,name.vm"... (I think) Obviously,
I'm doing this the wrong way.

How should this be done?

-kevin


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Getting the name of the current template

Posted by Jon Stevens <jo...@latchkey.com>.
on 8/9/01 1:56 PM, "Kevin Clark" <kc...@virtumundo.com> wrote:

> Thanks for the help this morning. I've got another...
> 
> I need to grab the name of the current template and put it into a link;
> specifically, so the same content will be shown after a login/logout.
> Currently, my logout links looks like this:
> 
> <a href="$link.setPage( $data.getScreenTemplate() )
> .setAction("user.LogoutUser")">Logout</a>
> 
> The basic idea is to show the same page, and execute the LogoutUser
> action...
> 
> however, when the current template is in a subdirectory of
> ...templates/screens/, such as templates/screens/foo/[name].vm, the
> parameters get screwed up:
> 
> http://myserver/name/servlet/name/template/*foo*/name.vm/action/user.LogoutU
> ser
> 
> So, turbine looks for "foo" instead of "foo,name.vm"... (I think) Obviously,
> I'm doing this the wrong way.
> 
> How should this be done?
> 
> -kevin

Try:

$link.setPage($data.getParameters().get("template"))

-jon


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org