Highlight current page in menu

For my developed themes, specially reDesign. Please make different topic for every problem.
Reply to topicReply to topic Printer Friendly Page
Forum FAQSearchView unanswered posts

Highlight current page in menu

Post Posted: 9.03.10. 02:23:49

Hi,
I am wanting to create a menu similar to this one which are links to actual articles. But I don't know how to make them highlighted as active when the article is selected.

I am using Redesign 3

TIA

Rusty_'s server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux / 2.2.6 / 5.0.45 / 5.2.4 / 9.2.1

Rusty_
Algaja
Algaja
 

Re: Highlight current page in menu

Post Posted: 10.03.10. 14:31:43

How deep in the site structure are they?
You could add them in menu category and use the block (or copy it with new name if you're already using it) that comes with reDesign 3 in top for these modules (or News module if you use that) and only need to change the design in the block.

Madis's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.0.63/5.0.67/5.2.5/9.2.1

Madis
Administraator
Administraator
 

Re: Highlight current page in menu

Post Posted: 10.03.10. 22:07:10

I'm not sure if I understand what you're saying, I am using Pro news as the module for the articles and set as home, but I'm not chasing a menu that flys out. I have tried making them a category link in the menu but because there is no other links in the category , they do not show.

Rusty_'s server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux / 2.2.6 / 5.0.45 / 5.2.4 / 9.2.1

Rusty_
Algaja
Algaja
 

Re: Highlight current page in menu

Post Posted: 11.03.10. 09:33:52

Ok I think I have got it worked out Rolling Eyes now I can argue why the other half doesn't need Wordpress Evil or Very Mad


What I did was edit CPG Main Menu in the admin area

Add a category and link to category same name and set the getlink to each Pronews article (Note: the Home link still had to be set to index.php for both Category and link)

Activate LEO in Main Settings that was my biggest oversight, the script doesn't recognise "/index.php?name=Pro_News&aid=6" it likes it like this "/Pro_News/aid=6.html" without LEO activated only Home in my case was staying highlighted as (Pronews is set as the home module) in the css menu.

Note. I only have Pronews and Contact Us as the active modules in Dragonfly, it is set up more like a static site that you can edit through an admin as SWMBO doesn't need all the other trinkets that go with a community site. Hence the reason for a menu layout like

Home | About Us | Services | Vision | Ect without drop downs, but still highlights the active link.



In the theme/style/cpgmm.css


I uncomment this on line 54 ( removed the /* and the */)

Code:
/*#menu li.currentcategory {
	background: none;
}
#menu li.currentcategory ul {
	display: none;
}
#menu li.currentcategory:hover a {
	background-color: #FFF;
	color: #000;
}*/


and Added
Code:
display: none;
to line 86 like shown below

Code:
/* Submenu */
#menu li ul {
	display: none;
  position: absolute;
  z-index: 10;
  visibility: hidden;
  margin: 0;
  padding: 2px;
  width: 160px; /* width of the dropdown lists*/
  background: #222222;
  background: rgba(0, 0, 0, 0.8);
  border: 0;
  line-height: normal;
  text-align: left;
}

And for cosmetics I removed
Code:
url('../images/backgrounds/header/menu/arrow_down.gif') no-repeat top right;

from line 20

Code:
background: transparent url('../images/backgrounds/header/menu/arrow_down.gif') no-repeat top right;

so it was only
Code:
background: transparent;

I will add a link to the site when I've got it up and running it's only on xampp at the moment.

Cheers
Hope this can be of help to someone

Rusty_'s server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux / 2.2.6 / 5.0.45 / 5.2.4 / 9.2.1

Rusty_
Algaja
Algaja
 

Re: Highlight current page in menu

Post Posted: 16.03.10. 04:47:23

Hi here's a link to the Website with the major styling done with the specific.css file and some in the header.html file

Note: I still need to cleanup some of the css code Embarassed , but hopefully it'll give someone some ideas

Cheers

Rusty_'s server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux / 2.2.6 / 5.0.45 / 5.2.4 / 9.2.1

Rusty_
Algaja
Algaja
 

Re: Highlight current page in menu

Post Posted: 1.09.10. 20:21:36

Thanks for this Rusty - I used it as the basis to work out how to do my own version.

I made the changes in specific.css so that I can update cpgmm.css if needs be. My version is similar to yours and can be seen here. Here's the code I added to specific.css (and made no changes to any other file).

Code:
#menu li {
    background: transparent;
}

#menu li.currentcategory {
	background-color: transparent;
	color: #FFF;
}
#menu li.currentcategory a {
    color: #000;
    font-weight: normal;
    background-color: transparent;
    padding-left: 0px;
    padding-right: 0px;
/* Add top padding for better visual, which also means take same amount off from bottom padding */
    padding-top: 13px;
    padding-bottom: 0px;
}

#menu li.currentcategory:hover a {
    background-color: transparent;
    color: #FFF;
}
#menu li.currentcategory ul {
	display: none;
}
#menu li.currentcategory:hover a {
	background-color: transparent;
	color: #FFF;
}

#menu li ul {
	display: none;
}


rosbif's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.11/5.0.91/5.2.8/9.2.1

rosbif
Tõusmas kõrgemale
Tõusmas kõrgemale
 
Page 1 of 1



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum