Forum OpenACS Development: default, site and blank master templates

5.0 has a three piece master template system: Default-master, site-master and blank-master are all used. Who wrote the current versions? They still have Kevin Scaldeferri name on them from AD.  Before I start massively changing them I'd like to understand what use cases you were thinking of when you decided what to put in which file and why you chose to make three different ones.

My current use case is creating a site where different subsites have completely different graphic looks, urls, etc.

Here are some problems I'm running into.

Acs-subsite has a parameter to let you specify the default-master template.  However most of what I want to change (header and footer) is in the site-master.  I don't really want a bunch of identical default-master's where the only thing that is different is the name of the site-master they call.

It seems like each subsite should have its own graphics (resources) directory for images in colors that match its design.  Is there any support for this currently?

Thanks

Collapse
Posted by Lars Pind on
Caroline,

I wrote it.

The idea is this:

1. blank-master is the template that drives some of the basic functionality, such as form field input focus, linking in CSS stylesheets, developer-support, translator-mode, etc., that master template authors would otherwise easily mess up, or they wouldn't keep their versions up-to-date. It doesn't show anything inside the browser frame, though (apart from translator mode/developer-support stuff), leaving completee design freedom to the template designer.

2. site-master gives you the top navigation, handling things like a link back to the index page, which isn't a link when you're on the index page already; login/logout/your workspace/admin links.

3. default-master goes all the way, to include context bar, page title, etc.

4. packages/acs-subsite/www/group-master is an alternative to default-master. It still uses site-master, but it adds a set of tabs for navigation inside the subsite.

/Lars

Collapse
Posted by Boris Doesborg on
One small point that I find hard to work with.

In the blank-master.tcl links to stylesheets are defined.

Like this:

multirow append header_links "stylesheet" "text/css" "/resources/acs-templating/lists.css" "all"
multirow append header_links "stylesheet" "text/css" "/resources/acs-templating/forms.css" "all"
multirow append header_links "stylesheet" "text/css" "/resources/acs-subsite/default-master.css" "all"

I don´t see why these links are here instead of in the group-master or something. They directly affect the appearance of lists and forms on the web page (a bit contradictory to the idea of the "blank" template).

If these links were in the group master you could leave the openacs template organisation intact and still change the design of lists and forms of the several subsites.

Collapse
Posted by Caroline Meeks on
Hi Lars,

I've implemented this on two sites now and I have some feedback.  First let me say I love the new default look and the CSS sheets.

But in terms of the masters...First the names are not good. Blank implies to me something you should fill in. However the blank master is the one you are least likely to need to change.  Maybe "setup-master"or "top-master".

Second I am tempted to recombine site-master and default-master. Perhaps this is because my use cases are different then yours.

I am roughly dividing the purpose of graphics into two categories.

Branding: Usually affects the top and bottom, logos graphics and colors (CSS) of a site.  This is currently controlled mostly in "site-master"

Information Architecture: Controls how you use the site, where and what the tabs are.  A dotLRN based site often has very different menu structure then a non-dotLRN site.  In my use cases this varies significantly from implementation to implementation but not much from subsite to subsite. Currently this is mostly controlled with the "default" or "group" master.

Currently there is a parameter to change "default-master" between subsites.  However,
in my experience/use cases changes in templates are usually done to support changes in Branding.  In other words one site is used to provide basically the same functionality to different groups within an organization or different organizations.

Most of the changes are therefore in the middle "site-master", not to "default".

Are you implementing a lot of another kind of use cases, where the branding stays the same and just the navigation switches between subsites?  I have seen this in the past but its not at all what I'm seeing these days.

Right now I'm leaning towards combining "default" and "site" master into one. I don't think we can predict which part is likely to change and which is likely to stay the same. Each layer of template adds to the learning curve and debugging time.  Maybe call this combined template "customization-master" and the other one that we don't want graphic artists touchng: "top-master".

A site with a number of different graphic designs would have more then one "customization-master" but hopefully only one "top-master". Ideally the "customization-master" has one css linked in that modifies all the previous CSS sheets and can be different for each different design.  We also need a way for the graphic artist to control what directory all the pages look for graphics in so the page graphics can match the outer design.

Collapse
Posted by Lars Pind on
It's called "blank", because that's what it is. It gives you a blank page, nothin' on it.

If you called it top-master, that would (to me) imply that it includes the top navbar -- which is what the site-master currently does.

The reason for the split between site-master and default-master is that the site-master is (supposedly) the stuff that stays constant across your site (login/logout, home page link), whereas you'd switch default-master for different purposes, e.g.:

- Your organization's public pages may have some left-side navigation

- Your organization's "community spaces" may use the group-master template.

- Your "developer home" could use a different navigation -- whatnot.

This is in fact the use-case that's currently implemented in the CVS tree, with the default-master and group-master templates, and the ability to switch between them from /admin/configure.

Would making default-master able to dynamically pick its master template solve your problem? You can fairly easily add a parameter to acs-subsite for that.

/Lars

Collapse
Posted by Malte Sussdorff on
Can you give me a reason, why you put the template in /packages/acs-subsite/www ?

Furthermore, wouldn't it make sense to agree to *one* storage facility for *all* templates (e.g. /templates)?

Last but not least, if we do this, would it be possible to automatically load all available templates to be useable in ://admin/configure).

What do you guys think. Jeff, does this interfere with your work.

I'm a little bit annoyed of looking all over my OpenACS installation on places where I can change the look and feel of my site. Gosh, I'm not even willing to write documentation for this as it s***s so much.

Collapse
Posted by Lars Pind on
Malte,

It should've gone in acs-subsite/lib/, but we didn't have /lib back then.

I put it in the acs-subsite package, because it's a template for acs-subsite ... just like a package-specific master template typically goes in the package directory, not in www. I believe there was even some discussion about it somewhere.

I agree on the desire for a standard way to store these, with the caveat that I'm thinking you should be able to install a "skin" package, which would include an acs-subsite master template, images, etc.

I don't think it's realistic for a default install to come with all the skins preinstalled.

/Lars

Collapse
Posted by Malte Sussdorff on
From a developers perspective I agree it makes sense to put the templates into /packages/acs-subsite/lib. But I still would put them unter /lib/templates or /templates, as this is a more obvious place for the occasional developer to look into. Any package that starts with acs- and looks like core is off limits to the occasional person installing the system (I'd assume) as this is a core package and you don't fuzz with core packages (at least, that's how I behave e.g. with PHP Horde).

OTOH, it is now documented, so if someone searches for the Community Template, this thread can be found ;).

Collapse
Posted by Malte Sussdorff on
group-master.adp. I removed the context bar, but refrained from uploading it to CVS. IMHO with the second level navigation, there is not much sense in using the context bar by default for the group-master.adp. But maybe this is just my site with not enough content.
Collapse
Posted by Don Baccus on
Without looking at the code (which I should probably do but you could to :) master templates have always gone in the www tree and I've always assumed that's an artifact of the implementation of the master tag in acs-templating.

I'd prefer it go into /templates (but aren't we using /lib?) ...

BTW I'm currently working on the portal system - have it running under subsites without .LRN actually - and all the .LRN portlets store their templates in /www, which is bad.  They should certainly be elsewhere (/templates or /lib whichever is right) rather than available through the http: protocol because they're meant to be included ...

Collapse
Posted by Jun Yamog on
Hi,

Please take note that /templates is controlled by CR. Templates are published there.  /templates is the root CR template folder of CR.  So there is a possibility of having /templates/foo.adp and CR will overwrite this with "foo" template.

Collapse
Posted by Caroline Meeks on
I am "skinning" a bunch of 5.0 sites this month with graphic designs not specifically designed for OpenACS.

Is there any documents, code, concensous on what the final solution for skinning should look like?

Here are some of the issues I've had so far.

1. All the things you'd typically expect a graphic artist to modify need to be in the same place and near the top of the tree. i.e. graphics, headers, footers, javascript, and at least the last CSS you load.

2. When subsites have their own design they may need thier own resource graphics (arrows and such) in matching colors. How should this be done?

3. In one case the site has different mostly static sections with radically different graphic design. I am trying to decide if I want to control the graphics with ETP or use subsites with ETP under them even through I need none of the group/user mangement of the subsite.

Collapse
Posted by Dave Bauer on
Right now, what you can do is create the subsite directories under www/subsite-name/ and put a resources directory underneath it for each subsite.

I am thinking that ideally we do want to put subsite templates under site-root/templates/ and build a corresponding cr_folder structure. Then with optional WebDAV support, or through a web interface, the ADPs could be edited for each subsite, and published back to the filesystem.

This doesn't help you right now, but it is good to think about how it might work better.