Jason,
I have the "newapp" application running and the "Login.vm" template and
"Login.vm" layout are a part of that example. ... but ...
How do I activate another layout for another template?
Is it a pattern by name?
I have a screen in a subdirectory of the "screens" directory and I want it
to have a different layout. Where do I specify this?
A) TurbineResources.properties by installing a subclass of
"VelocityNavigation.java" such as ...
services.VelocityService.default.navigation=JoesVelocityNavigation
B) In the screen itself?
Administration.java
...
import org.apache.turbine.services.logging.TurbineLogging;
...
protected boolean isAuthorized( RunData data ) throws Exception
{
boolean isAuthorized = false;
AccessControlList acl = data.getACL();
if (acl == null )
{
data.setScreenTemplate(
TurbineResources.getString("template.login"));
isAuthorized = false;
}
else if(acl.hasRole("turbine_root"))
{
isAuthorized = true;
}
else if(acl.hasRole("turbine_admin"))
{
isAuthorized = true;
}
TurbineLogging.info("\nisAuthorized = "+isAuthorized+"\n", data);
if ( isAuthorized == true )
{
data.setScreenTemplate(
TurbineResources.getString("template.admin_layout"));
}
return isAuthorized;
}
====================================================
Also, Jason ....
The line ....
TurbineLogging.info("\nisAuthorized = "+isAuthorized+"\n", data);
dosen't seem to be outputting anything to Turbine.log ... Other messages are
going in the log, but not mine?
What else should I look at?
=============================
Joet
Software Sculptor
=============================
----- Original Message -----
From: "Jason van Zyl" <[EMAIL PROTECTED]>
To: "Turbine Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, October 31, 2001 9:13 PM
Subject: Re: Multiple Layouts for Log-In, special sections, and then
ofcourse the "default"...
> On 10/31/01 11:03 PM, "Joe Terry" <[EMAIL PROTECTED]> wrote:
>
> > Anyone have an example of subclassing "VelocityNavigation".
> >
> > I need to have a layout for Log-In that is different from the layout for
> > another section of the application, that is completely different from
the
> > "Default" layout.
>
> If you have a screen template named Login.vm than make a corresponding
> layout template called Login.vm and the two will be used together.
>
> > I have built the Javadocs, I have the source. 2.2b1
> >
> > I'm not happy with the documentation, but Turbine rocks ... If only, I
can
> > meet my deadlines ...
> >
> > Cheers!
> >
> > Joet
> >
>
> --
>
> jvz.
>
> Jason van Zyl
>
> http://tambora.zenplex.org
> http://jakarta.apache.org/turbine
> http://jakarta.apache.org/velocity
> http://jakarta.apache.org/alexandria
> http://jakarta.apache.org/commons
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>