Forum OpenACS Q&A: Re: OACS Homepage Template/ETP Implementation

Collapse
Posted by Ola Hansson on
Randy,

The instructions on how to set up etp for the homepage can be found here: https://openacs.org/doc/edit-this-page/install or under /doc on your personal installation.

In the case of openacs.org we made a homegrown "application" (how this is done is described in the etp docs, and you can see our implementation here: http://dev.openacs.org:8000/cvs/openacs.org-dev/tcl/openacsorg-init.tcl?rev=1.3&content-type=text/x-cvsweb-markup) for etp that was just meant to be used on that instance of the etp packqage, i.e., the start page...

We associated this "homepage-new" etp application with the etp package instance via etp's "Change ETP Application" UI. The homepage-new application, in turn, specifies which template should be used for etp package instances that are associated with this particular application. In this case the template is "/www/templates/homepage-new-index" (here is the adp half of the template: http://dev.openacs.org:8000/cvs/openacs.org-dev/www/templates/homepage-new-index.adp?rev=1.11&content-type=text/x-cvsweb-markup).
This template, as you can see, places the main etp instance content where the @pa.content@ variable is. There is no <slave> tag in this (etp) case. The template also <include>s different "widgets" such as postings and news and passes title properties to the different widgets. The widgets generally "dress" themselves in the "box-master" template by having a <master> tag at their top and they also propagate the title, as in this case, to the box-master. To get back to the "homepage-new-index" template ... *it* (and the content it's built up so far) gets wrapped or dressed in the the default-master template of the subsite at hand which, I think, happens to be "general-master" for the main openacs.org subsite. The <master> tag uses the default-master of the subsite if there's no "src" specified, you know...

(The reason we didn't use the default default-master was that we didn't want to destroy the design that Musea had in place already when we started development of the new templates. So we changed to another "subsite master template" by changing the kernel param that decides this.)

I hope that this will help you grasp how things are put together, and if you don't it is due to my poor pedagogical skills.  Anyway, ask if something's unclear and I or someone else will try to make it clearer.

Now, if this is the way these things *should* be handeled is  a completely different matter altogether and a question which is debatable...