At 05:45 02/22/01, John McNally wrote:
>ingo schuster wrote:
> >
> > At 16:09 02/20/01, Sean Legassick wrote:
> > >On Fri, Feb 16, 2001 at 05:57:24PM +0100, ingo schuster wrote:
>[...]
> > > > 2. The default.layout.template in TR.p is not used at all - it is
> > > hardwired
> > > > to "default."
> > > >
> > > > The patch below fixes it. I'm not sure about the line
> > > >    pkgs[arrayIndex] = pkg.append("Default").toString();
> > > > It seems to hardwire the default layout module to "Default", 
> however I'm
> > > > not sure if it is used with templating at all?
> > >
> > >No, it's not - you are right that's not needed.
> >
> > Ok, below is a modified version of the patch.
> >
> > ingo
> >
> > Index: TurbineTemplateService.java
> > ===================================================================
> > RCS file:
> > 
> 
>/products/cvs/turbine/turbine/src/java/org/apache/turbine/services/template/TurbineTemplateService.java,v
> > retrieving revision 1.16
> > diff -u -r1.16 TurbineTemplateService.java
> > --- TurbineTemplateService.java 2001/02/08 23:55:43     1.16
> > +++ TurbineTemplateService.java 2001/02/21 17:19:02
> > @@ -196,6 +196,10 @@
> >           // the default layout template
> >           defaultLayoutTemplate = props
> >               .getProperty("default.layout.template", "/default." +
> > extension);
> > +        if (defaultLayoutTemplate.indexOf('.') == -1)
> > +        {
> > +            defaultLayoutTemplate = defaultLayoutTemplate + "." + 
> extension;
> > +        }
>
>I am not sure why one would specify the default layout template without
>giving the extension explicitely, but I guess someone could, so +0.

Jetspeed will do this, as it wants to support two templating systems and 
make it as easy as possible to configure the webapp for either one or the 
other.
With no extension, it's one key less that has to be adopted.


> >       }
> >
> >       /**
> > @@ -468,8 +472,7 @@
> >                   pkgs[arrayIndex] = 
> distinctPkg.append(className).toString();
> >                   arrayIndex++;
> >               }
> > -            paths[arrayIndex] = path.append("/default." +
> > extension).toString();
> > -            pkgs[arrayIndex] = pkg.append("Default").toString();
>
>
>Why are you removing the pkgs Default?

They are not needed for templating. Please see Sean's comment above.

ingo.

>John McNally
>
> > +            paths[arrayIndex] = 
> path.append(defaultLayoutTemplate).toString();
> >               arrayIndex++;
> >           }
> >



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to