Where is the Header?

Creating and modifying plugins.
Post Reply
codetwists
Regular
Posts: 44
Joined: Sat Dec 20, 2008 5:46 pm

Where is the Header?

Post 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
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Where is the Header?

Post 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
codetwists
Regular
Posts: 44
Joined: Sat Dec 20, 2008 5:46 pm

Re: Where is the Header?

Post 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
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Where is the Header?

Post 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
codetwists
Regular
Posts: 44
Joined: Sat Dec 20, 2008 5:46 pm

Re: Where is the Header?

Post 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
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Where is the Header?

Post 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
Post Reply