Page 1 of 1

Andreas08 Theme

Posted: Thu Jan 18, 2007 3:20 pm
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.

Posted: Thu Jan 18, 2007 6:04 pm
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

Posted: Thu Jan 18, 2007 6:39 pm
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

Posted: Sun Jan 21, 2007 10:12 am
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>