On Sat, 06 May 2000, you wrote:
> I want to be able to have a Screen class override the layout template that
> will be executed by returning a method from Screen.getLayout(). This would
> happen somewhere in WebMacroSitePage, but I don't want it to interrupt the
> current scheme of doing the layout search path. One idea I was thinking of
> having is a check to see if a Screen has overridded that method by looking
> at the results. If the string ends with ".wm", then consider it overridden
> and attempt to execute it. What do you think of that idea?

I think the current system will do what you need.  I can define/
re-define my Layouts in two ways:

1.  Name the Layout the same as the screen
        screens/admin/main.wm
        layouts/admin/main.wm
2. Name the Layout "default" under the directory structure. 
        layouts/admin/default.wm
   Now with #2, all screens in the admin sub dir will use the default
.wm layout unless you've done #1 for a template.

Is this what you're talking about?
 
> Also, we should think about doing a caching system so that the search path
> only happens once on a "production" box. In other words, once the template
> is found, stick with that one template and don't do the search over and over
> again. What do you think of that?

Definitely!  I was thinking of a "PathMap" object that would store
the Screen and Layout associated with a template by name ( a hashtable
of PathMap objects).  To keep things simple why not just store this
Lookup table using Turbine's cacheing Service in the WMSitePage? 

-- 
dave
[EMAIL PROTECTED]
----------------------
< your inspirational quote here > 


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to