Thanks Chris, I have found your previous reply, see below.

I have two questions on them:

1. I followed your instruction and built a file structure as indicated.
When I First login to DOM1, TDK does not seem to be able to find the TOP
and BOTTOM part of the page.  And after login, I have this error message:

Horrible Exception: java.lang.Exception: Screen template '/Index.vm' not
found

2. In your previous reply, you use .dom1 and .dom2, are they suppose to be
subdirectories under
./WEB-INF/src/java/org/apache/turbine/flux/modules/screens/dom1/Default.java
?

/modules.screens
        MpiScreen.java
        Default.java
        .dom1
                Default.java
        .dom2
                Default.java
                .admin
                        Default.java (requires authentication)
                        Login.java
thanks
michael

I haven't ever used Flux, but I can answer your first question...

Just make the same directory structure in the layouts, screens, and
navigation templates, then mirror that structure with packages in your
modules.screens package.  You *should* be able to figure this out from the
Velocity Site Howto, but it took me a while to understand it.  For example,
I am building two websites domain1.com and domain2.com to run in the same
turbine instance.  My structure looks like this:

/templates
        /app
                layouts/
                        Default.vm (Turbine Requires this, it is blank)
                        dom1/
                                /Default.vm
                        dom2/
                                /Default.vm
                                admin/
                                        /Default.vm
                navigations/
                        dom1/
                                TopMenu.vm
                                LeftSideMenu.vm
                        dom2/
                                Menu.vm
                                admin/
                                        /Tabs.vm
                screens/
                        dom1/
                                /Index.vm
                                /Error.vm
                                /Whatever.vm
                        dom2/
                                /Index.vm
                                /Error.vm
                                /Whatever.vm
                                admin/
                                        Index.vm
                                        Error.vm
                                        Login.vm
                                        SamplesManagement.vm

/modules.screens
        MpiScreen.java
        Default.java
        .dom1
                Default.java
        .dom2
                Default.java
                .admin
                        Default.java (requires authentication)
                        Login.java

NOTES:
*Turbine tries to use a layout that matches the template request
*Turbine uses the first Default screen it finds starting in the subpackage
that most closely resembles the template request
*The Error.vm lets you have formatted error screens that match your current
"site" look and feel.
*Extend TemplateLink to automatically map the template paths for you:
        $link.setDom1Page("Whatever.vm") ==> /template/dom1,Whatever.vm
        instead of....
        $link.setPage("dom1,Whatever.vm")
*You can have as many different virtual sites as you need.
*My admin section is secured, the others are publicly accessible
*Incidentally, both dom1 and dom2 have common functionality such as a tile
sample shopping cart.











>> From: Eigen Technology Pty Ltd
>> nhow do I specify in this newFile.vm to
>> use this new set of layouts ?
>
> Sub folders work well for this too.
>
> If you create similar folder-trees in your /app/layout,
> /app/navigations, /app/screens and optionally your
> com.mycompany.modules.screens package, then Turbine will use the proper
> layout and navigation templates depending on which subfolder the
> requested template is in.  This feature saves you many calls to
> data.setLayoutTemplate().  Search the archives for a thread "additional
> root directories?" for more information if you want to pursue this
> route.
>
> Chris




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to