Forum OpenACS Development: Proposal: search order for <master> tag

As per this thread and some offline discussions with Jeff Davis:

https://openacs.org/forums/message-view?message_id=50091

I would like to propose that the search order of the <master> tag (when the "src" parameter is not specified) be as follows:

* search for a master template in the current directory (ie, directory-local master)

* if none found, search for a master template in the package's www/ directory (ie, package-local master)

* if none found, use the subsite master template

* special case: if a page is itself a master template and invokes "<master>", then it should obviously ignore itself and begin searching one-level down

* the names of the local masters would be specified as subsite parameters, but would default to "default-master"

Now that we've removed the package-wide masters in most, if not all, of the current packages, this proposal would allow us to regain the flexibility of adding customizations at the directory and package levels.  Examples of this can be found in the aforementioned thread.

I'm willing to implement this for the 4.7 release.

Collapse
Posted by Vinod Kurup on
This sounds good to me. Should there be a step between directory-local and package-local (i.e. walking up each directory)? This would allow pages in www/admin/users to inherit from the admin template instead of the package-local template.
Collapse
Posted by Robert Locke on
You're absolutely right Vinod!
Collapse
Posted by Roger Williams on
I thought there was some problem where a subsite specific main page had to be stored in a directory under the root, since the subsite main page came from the /skin directory.

I mention this because you reference a subsite-master template.

Maybe you guys fixed this (which was originally a problem in ACS 4.2b).

Regards..

Collapse
Posted by Robert Locke on
Hi Roger,

The DefaultMaster parameter of any subsite contains the path to the default master skin starting from the installation's root directory (eg, /web/servername).  So "/www/templates/default/index" would be a valid entry if your master template files were located at "/web/servername/www/templates/default/index.(tcl/adp)".

Don't know if that means the problem was fixed, but I assume so.

Collapse
Posted by Lars Pind on
If this is still desired, could someone post a TIP on this, and we'll try to get it into 5.0 before feature freeze if there's OCT consensus on the matter.

https://openacs.org/bugtracker/openacs/bug?bug_number=68

/Lars