Forum OpenACS Q&A: Re: Current state of theming in OpenACS (without .LRN)

Posted by Jim Lynch on

Dave, thanks...

(aside, note to self:

so when you want to extend a package, you would go to the package manager, click on the package, and scroll down to "manage dependencies and provides", and (as of openacs-5.7) you will see four sections... it's not the first one (provides) which you can't edit anyway, it's not the second (depend-on), it's the third one (extend), count one-tuo-three) and then add the package you want to extend. In this case subsite.

Earlier, I tried to create the subsite package -depending- on subsite, that didn't work, then I tried to take the same package and add the extend, database said unique constraint, so I made a new package, -only- extended, and whizbangabbracadabbra. worked.)

I started working on the automation, and since I have no info on the future, it will only work on 5.7.


these are the files that have "openacs-default-theme":

jim@amdlap:/web/oacs57tst/packages/openacs-default-theme$ grep -rc openacs-default-theme . | grep -v ":0$"

and these are the files whose name contains openacs-default-theme:

jim@amdlap:/web/oacs57tst/packages/openacs-default-theme$ ls -R | grep  openacs-default-theme

I'll start working on the info file, and since it's xml, I'll try to use tdom to parse into something I can look at the pieces.

Progress so far: I did one by hand, and it's working.

To add specifics, after changing files containing "openacs-default-theme", I had to...

  • alter subsite params:
    • DefaultMaster
    • ThemeCSS
    • ThemeKey
  • edit (myPackage)-theme/tcl/apm-callback-procs.tcl:
    • change the name of the namespace
    • alter -key, -name, -template, -css of both calls to subsite::new_subsite_theme
    • get rid of the default parameter setters at bottom of proc

One thing I found, is you have to rename the theme specifier because they have to be unique. In openacs-default-theme, those are named default-plain and default-tabbed. After I copied the package openacs-default-theme to a-site-theme, I renamed default_plain to a_site_plain and default_tabbed to a_site_tabbed in what was originally openacs_default_theme::install::after_install() which I renamed to a_site_theme::install::after_install().