Home | Products | Consulting | Hosting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
CSS Current page

 

 


chassa2556
User

Jun 23, 2008, 2:47 AM

Post #1 of 9 (238 views)
Shortcut
CSS Current page Can't Post

Is there a way of editing the active page tag in CSS so that the active page is highlighted in green.

http://www.straloch.com/newsite/indexpages.php?1&theCategory=The+Dower+House

Many thanks in advance


gkornbluth
User

Jun 23, 2008, 9:34 AM

Post #2 of 9 (228 views)
Shortcut
Re: [chassa2556] CSS Current page [In reply to] Can't Post

I'm not sure if I understand what you are asking for, but if I do, then this might help. You can apply the concept to any css style sheet or in any editor that you'd like. It doesn't rely on Dreamweaver or on Library items

Good luch

Download the free Dreamweaver Tutorial Video


Dave
Staff / Moderator


Jun 23, 2008, 9:44 AM

Post #3 of 9 (226 views)
Shortcut
Re: [chassa2556] CSS Current page [In reply to] Can't Post

Do you mean so that the currently selected menu item shows in green? Or something else?

Dave Edis - Senior Developer
interactivetools.com


chassa2556
User

Jun 23, 2008, 10:24 AM

Post #4 of 9 (222 views)
Shortcut
Re: [Dave] CSS Current page [In reply to] Can't Post

yes I mean that the currently selected page shows in green. So people have an indication where they are...Sorry I wasn't very clear!


Dave
Staff / Moderator


Jun 23, 2008, 10:26 AM

Post #5 of 9 (218 views)
Shortcut
Re: [chassa2556] CSS Current page [In reply to] Can't Post

Ok, and the category name is always in the url as theCategory=... is that right? Can you past the few lines of code that displays the category name? Or attach indexpages.php to this post so I can see it?

Dave Edis - Senior Developer
interactivetools.com


chassa2556
User

Jun 23, 2008, 10:41 AM

Post #6 of 9 (217 views)
Shortcut
Re: [Dave] CSS Current page [In reply to] Can't Post

have included attachment for you to look at. thanks
Attachments: indexpages.php (5.41 KB)


Dave
Staff / Moderator


Jun 23, 2008, 12:54 PM

Post #7 of 9 (210 views)
Shortcut
Re: [chassa2556] CSS Current page [In reply to] Can't Post

Thanks, It looks like it might be in secondarynav.php. Do you want to just send me FTP to dave@interactivetools.com and I can update it for you? (Email, don't post FTP details in forum). That way I can easily get to any other files I need. I'll post back what I changed here.

Let me know if that works for you.

Dave Edis - Senior Developer
interactivetools.com


Dave
Staff / Moderator


Jun 23, 2008, 4:21 PM

Post #8 of 9 (201 views)
Shortcut
Re: [Dave] CSS Current page [In reply to] Can't Post

I've responded by email but here's how I did. It's a little hard because this site is a bit more complicated with it's structure but here they are:

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!

Dave Edis - Senior Developer
interactivetools.com


IronVictory
User

Jun 25, 2008, 1:04 PM

Post #9 of 9 (185 views)
Shortcut
Re: [Dave] CSS Current page [In reply to] Can't Post

Thought this might help others. This is what I do:
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

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Hosting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4