Page 1 of 1
Where is the Header?
Posted: Sun Dec 21, 2008 11:37 pm
by codetwists
I'd like to change how the blog title behaves in the header. Can anyone tell me where that code is located. I'm using the Idea skin style if it makes a difference.
Thanks,
Myron
Re: Where is the Header?
Posted: Sun Dec 21, 2008 11:53 pm
by yellowled
codetwists wrote:I'd like to change how the blog title behaves in the header. Can anyone tell me where that code is located.
/templates/YOURTEMPLATE/index.tpl
Look for serendipity_banner, which is usually - but not in every template - the id for that part's container div. Also notice that the index.tpl file uses Smarty, PHP's template engine.
YL
Re: Where is the Header?
Posted: Mon Dec 22, 2008 12:02 am
by codetwists
yellowled wrote:Also notice that the index.tpl file uses Smarty, PHP's template engine.
Thanks, YL. Looks like I'm going to learn something new. I know nothing about Smarty at all.
Myron
Re: Where is the Header?
Posted: Mon Dec 22, 2008 12:14 am
by yellowled
codetwists wrote:Looks like I'm going to learn something new. I know nothing about Smarty at all.
You're welcome. If you're familiar with HTML and a "true" programming language like PHP, it should be a piece of cake. But in my experience (which refers to myself), even non-coders can understand Smarty pretty well. Actually, I feel it's way simpler than template systems based on pure PHP. Your mileage may vary
YL
Re: Where is the Header?
Posted: Mon Dec 22, 2008 12:34 am
by codetwists
yellowled wrote:/templates/YOURTEMPLATE/index.tpl
That actually was one of the places I originally looked, but there wasn't an index.php in it. I didn't think about the .tpl. I also didn't think to look in templates/default/index.tpl, which is where I eventually found it. The Idea style doesn't have a lot of it's own files, apparently.
Thanks again!
Myron
Re: Where is the Header?
Posted: Mon Dec 22, 2008 12:58 am
by yellowled
codetwists wrote:I also didn't think to look in templates/default/index.tpl, which is where I eventually found it. The Idea style doesn't have a lot of it's own files, apparently.
/templates/default/ is the "fallback template". If a template doesn't have one or more of the templates files s9y usually uses, it takes the corresponding file from default/. So i.e. if your template doesn't have an index.tpl, s9y uses the index.tpl from default.
Now if you want to modify the index.tpl, but your template doesn't have an index.tpl, you can just copy the one from default/ to your template directory and edit the copied version.
YL