Page 1 of 1

How do you add code to header when no index tpl in theme?

Posted: Wed Apr 05, 2006 9:38 pm
by Nemesis
I've just moved to Serendipity after abandoning Wordpress. I'm starting off with the party brown template but customising themes in s9y isn't as straight forward as WP.

I want to add two pieces of code to the header. One is a small CGI script for a clock and the other is a tracking script for my web stats program. There doesn't appear to be a tpl file in this theme so where would i have to add these scripts?

Any help would be great until i've learned my way around this prog.

many thanks in advance.

Re: How do you add code to header when no index tpl in theme

Posted: Wed Apr 05, 2006 9:59 pm
by garvinhicking
Hi!

Serendipity actually "falls back" to the default template's *.tpl files, if the current template doesn't provide any own template file. This was done so that themes can only modify the files they really need to modify, and leave the rest stemming from the default theme.

To make your theme (modification) recognize/change anything in those files, just copy the templates/default/XXX.tpl file into your directory and make the changes. Then those will be applied to your template!

HTH,
Garvin

Posted: Wed Apr 05, 2006 10:52 pm
by Nemesis
Excellent stuff. Thanks very much for that. Worked like a dream :)