Head_titles and defaults
Posted: Fri Dec 29, 2006 1:09 pm
Hi All
I've decent experience in PHP and programming in general, but am new to Serendipity and Smarty tpl.
A beginner's question I guess:
On my homepage h1 and h2 are blank, h1#title shows the blog title.
On an item page h1 and h1#title show the entry title and h2 shows the blog title.
What I want to see is this:
h1 always shows the blog title
On homepage h1#title shows blog title
On item page h1#title shows the entry title
Can anyone point out what I'm doing wrong: I don't understand why h2 is inheriting what I believe h1 should be displaying.
(I think essentially what I want to know is how do I get to display by itself?)
Thanks for any help forthcoming.
I've decent experience in PHP and programming in general, but am new to Serendipity and Smarty tpl.
Code: Select all
<div id="left">
<h1><a href="{$serendipityBaseURL}">{$head_title}</a></h1>
<h2><a class="homelink2" href="{$serendipityBaseURL}">{$head_subtitle|@default:$blogDescription}</a></h2>
</div>
<div id="content">
<h1 id="title"><a href="{$serendipityBaseURL}">{$head_title|@default:$blogTitle|truncate:80:" ..."}</a></h1>
{$CONTENT}
</div>
On my homepage h1 and h2 are blank, h1#title shows the blog title.
On an item page h1 and h1#title show the entry title and h2 shows the blog title.
What I want to see is this:
h1 always shows the blog title
On homepage h1#title shows blog title
On item page h1#title shows the entry title
Can anyone point out what I'm doing wrong: I don't understand why h2 is inheriting what I believe h1 should be displaying.
(I think essentially what I want to know is how do I get
Code: Select all
@default:$blogTitle|truncate:80:" ..."Thanks for any help forthcoming.