Andreas08 Theme

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
bungybunny
Regular
Posts: 5
Joined: Thu Jan 18, 2007 11:17 am
Location: Totternhoe, UK
Contact:

Andreas08 Theme

Post by bungybunny »

Only installed s9y today and this is my first post here, so this may well be a newbie question (so I'll get my apologies in in advance!).

I'm stumbling around getting to grips with s9y and using the Andreas08 theme/template.

My problem is that looking at index.tpl I can't see how a list item other than the baseURL ever gets the 'selected' class applied to them. The upshot of this is that when, for example. I load the page behind the 'About' button, the highlighting defined by the 'selected' class remains on the baseURL (ie HOMEPAGE) and not the 'About' button as I would have expected.

Am I missing something obvious?

Great tool by the way. Deserves to be called more than blog application.
d_cee
Regular
Posts: 603
Joined: Wed Jan 18, 2006 6:32 pm
Location: UK
Contact:

Post by d_cee »

Hi

you could take a look at this thread which might help
http://board.s9y.org/viewtopic.php?p=44981 and Abdussamad has very kindly shown how he did it with his 'Freshy' theme port on his blog http://abdussamad.com/archives/77-Refre ... -port.html

HTH

Dave
bungybunny
Regular
Posts: 5
Joined: Thu Jan 18, 2007 11:17 am
Location: Totternhoe, UK
Contact:

Post by bungybunny »

That looks like just what I'm looking for. Obviously I didn't lob the correct term(s) in the forum search. I'll have a hack tomorrow.

Many thanks for the response, much appreciated.

Andy
bungybunny
Regular
Posts: 5
Joined: Thu Jan 18, 2007 11:17 am
Location: Totternhoe, UK
Contact:

Post by bungybunny »

Based on Abdussamad's changes I've amended my version of the Andreas08 template. Not entirely sure I'm happy with the look yet, but it's there technically.

If anyone's interested the code is here:

[config.inc.php]

Code: Select all

$serendipity['smarty']->assign(array('currpage'=> "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']));
$serendipity['smarty']->assign(array('currpageuri'=> $_SERVER['REQUEST_URI']));
[(blue|green|etc).css]

Code: Select all

#navigation .loaded {background:#ffffff;}
#navigation .loaded a{color:#000000;}
[index.tpl]

Code: Select all

<ul>
    <li {if $currpage==$serendipityBaseURL}class="loaded"{/if}>
	<a href="{$serendipityBaseURL}" accesskey="h">HOME</a>
	</li>
	{if $head_version < 1.1}
		<li><a href="#">About</a></li>
		<li><a href="#">Photos</a></li>
		<li><a href="#">Contact</a></li>
	{else}
        {foreach from=$navlinks item="navlink"}
           <li {if $currpageuri==$navlink.href}class="loaded"{/if}>
	   <a href="{$navlink.href}" title="{$navlink.title}">{$navlink.title}</a></li>
	{/foreach}
	{/if}
</ul>
Think occasionally of the suffering of which you spare yourself the sight
Post Reply