Hi,

I spent my Saturday converting a number of PostNuke themes to work under the Smarty theme on the download page. At the moment I have /themes/smarty and inside there a directory called sub followed by each relevant theme. Ie: sub/nice-grey sub/inverse sub/metalic and so on. So far there are about 20 themes, and all (with a few hacks) are looking good. What I'd like to do is find a way to allow use of these themes on my site. At the moment the only way to do so is to edit smarty.theme and point it to one particular subtheme which is ok if I don't want visitors to choose their own theme, but that's not what I want.

I created a sideblock which allows users to preview all the smarty themes and that works ok, and if I wanted I could perhaps convert that block to a module and make use of the _init function to store a cookie on the users machine, but it would be much nicer if there was a way of holding that information on the server side, instead of user side.

Does anyone have any ideas how I could go about implementing such a scheme? I think that maybe modifying Drupal to use Smarty in it's system by default would be a good way to go. I find that creating themes without it leads to lots of blank pages with no real indication as to what went wrong. At least once the Smarty theme is up and running, if I make a typo or there's an error, the Smarty system catches it and tells me exactly what's up.

I'm sorry for my English, it's not my first language. I hope the above can be understood.

Regards,
Romano

Comments

anode’s picture

The easiest (although somewhat crude) way I can think of is just to make a copy of "smarty.theme" for each sub-theme (with the corresponding sub-theme hard-coded in.) Name each of those as "sub-themename.theme" and you're good to go.

mcking’s picture

Topic says it all. I was wondering how xtemplate generates the admin menu, and if stuff like the .css files (for color schemes, etc...), base templates and all that could be loaded from these settings.

I currently use the 'interlaced' theme and copy the theme to a new name and then fiddle with the names in the .theme file to make similar themes with different names and color schemes. This is, of course, error prone and I don't really like it.

It would be nice if there was a standard way for all of the themes to do this.