CSS Current page
21 posts by 7 authors in: Forums > CMS Builder
Last Post: March 18, 2009 (RSS)
By chassa2556 - June 23, 2008
http://www.straloch.com/newsite/indexpages.php?1&theCategory=The+Dower+House
Many thanks in advance
Re: [chassa2556] CSS Current page
By gkornbluth - June 23, 2008
Good luch
[url "http://app.expressemailmarketing.com/get.link?linkid=794329&subscriberid=73181730&campaignid=234505&linkurl=http://www.kperspectives.com/Dreamweaver/video_tutorials/dreamweaver/dreamweaver_library_class.zip"]Download the free Dreamweaver Tutorial Video[/#800080][/url]
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php
Re: [chassa2556] CSS Current page
By Dave - June 23, 2008
interactivetools.com
Re: [Dave] CSS Current page
By chassa2556 - June 23, 2008
Re: [chassa2556] CSS Current page
By Dave - June 23, 2008
interactivetools.com
Re: [Dave] CSS Current page
By chassa2556 - June 23, 2008
Re: [chassa2556] CSS Current page
By Dave - June 23, 2008
Let me know if that works for you.
interactivetools.com
Re: [Dave] CSS Current page
By Dave - June 23, 2008
You can see the green highlighting on the secondary menu for this page:
http://www.straloch.com/newsite/secondary.php?8&theCategory=Straloch+Estate
I edited secondarynav.php, added this code to get the current record number:
$num = getNumberFromEndOfUrl();
And this code to display the class in the foreach loop
<?php if ($num == $record['num']): ?>greenbuttons<?php endif; ?>
For headernav.php I added this code:
<?php if (@$_GET['theCategory'] == $pagesRecord['title']): ?>greenbuttons<?php endif; ?>
Hope that helps!
interactivetools.com
Re: [Dave] CSS Current page
By IronVictory - June 25, 2008
1) Set up a class named ".current" with the colours you want for the active link.
2) Use this code in the link:
<a href="page.php?category=something" <?php if ($category == "something") { echo "class=\"current\"";} ?> >link</a>
Peter
Re: [Dave] CSS Current page
By Djulia - March 11, 2009
I have a problem which I am not able to solve with the [font "Times New Roman"]$num condition.[font "Times New Roman"]
<?php if ($num == $record['num']): ?>greenbuttons<?php endif; ?>
The value of $record['num']): is ever modified.
It always preserves the value of the first recording in the table.
But, my approach is perhaps not the good one...
I want to obtain the entries of the table to build a menu and to identify the recording to emphasize it with a style.
You have an idea ?
Thanks,
Djulia