On 11/21/01 4:09 PM, "Dan E." <[EMAIL PROTECTED]> wrote:
> I agree. Maybe someone else has a better approach.
Yes, there is a better approach which is to use Turbine's internal method of
matching layouts to screen templates. Read the FSD to see how this is done,
I've personally explained this numerous times and I know that John has as
well. In short if you have
templates/
screens/
backoffice/
Index.vm
frontoffice/
Index.vm
layouts/
backoffice/
Default.vm
frontoffice/
Default.vm
Than the backoffice/Default.vm layout will be used with your backoffice
screen templates, and frontoffice/Default.vm layout will be used with your
front office templates. Turbine's template service will match them up for
you.
> Dan Eyassu
>
> On Wed, 21 Nov 2001, Scott Merritt wrote:
>
>> Cool, that works great but seems kinda ugly to be putting that big call in
>> all screens...
>>
>> -----Original Message-----
>> From: Dan E. [mailto:[EMAIL PROTECTED]]
>> Sent: Wednesday, November 21, 2001 12:36 PM
>> To: Turbine Users List
>> Subject: Re: How are layouts found?
>>
>>
>> Try adding this to the top of each screen(.vm file) that is in a
>> subdirectory:
>> $data.getTemplateInfo().setLayoutTemplate("/<subdirectory>/<screen>.vm")
>>
>> substitute 'subdirectory' and 'screen' appropriately.
>>
>> Dan Eyassu
>>
>> On Wed, 21 Nov 2001, Scott Merritt wrote:
>>
>>> I wrote a small app that has pages for the backoffice portion and the
>> actual
>>> site has it's own public pages. The pages for the backoffice tool extend
>>> from a secure screen class and the site pages extend off of different
>>> classes.
>>>
>>> My question is... how do I get Turbine to select a template layout for
>> the
>>> tool pages and a seperate layout for the public site?
>>>
>>> I started putting the two groups of pages (screens) in seperate
>> directories
>>> under the /screens directory but that just led to more confusion.
>>>
>>> Thanks...
>>>
>>> --
>>> 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]>
>>
>> --
>> 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]>
--
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]>