Forum OpenACS Q&A: Re: What is the recommended way to do this?

Collapse
Posted by Don Baccus on
Make your own theme package and bury the crap in the theme's master template, having it determine whether or not to wrap the page with a navigation etc.

Making a theme package is easy enough, just clone openacs-default-theme giving your own name, and then in the apm callback change the call that makes the theme known to the system to use your theme name, your css, your master, etc.

In this way you don't have to fork any of our standard files, which should make updating your acs-core etc easier in the future ...

Collapse
Posted by Richard Hamilton on
Brilliant - thanks Don. That was exactly the kind of thing I was hoping for.

Plenty to go at!

R.

Collapse
Posted by Richard Hamilton on
Don,

Just trying to follow through your instructions but getting a tad confused.

I have cloned the openacs-default-theme and renamed all occurences of that name to myown-default-theme. Reading through your comments in apm-callback-procs.tcl just before the parameter::set_default directive your comments say:

"Don't do this if you're creating your own theme package! Override the default by creating a custom install.xml file to be run during the install process..."

I have searched the /packages directory for examples of install.xml files but there are only three which are inside the /docs directories (e.g. the one in the categories package) and they seem to contain readable documentation.

I can see that the idea is that an install.xml file would be parsed and references to procs in the install-procs.tcl file would be activated by it. However I am not clear where this install.xml file should be put or where the tcl procs it refers to should correctly go.

I am also not clear why I shouldn't just set the parameters in the after install callback tcl proc as per openacs-default-theme.

(I wonder if the reference to install.xml literally a file called install.xml, or is it intended to mean the package.info file which is in fact an xml file).

Sorry to have to ask.

Regards
Richard