FORUM IS CLOSED. PLEASE USE QUESTIONS / ANSWERS PAGE INSTEAD
Login  |  Forum  |  Search   

Board index » Development » Help requests




Post new topic Reply to topic  [ 2 posts ] 
 
Author Message
 Post subject: Highlight menu if invisible page is selected?
 Post Posted: Tue Jan 10, 2012 9:35 am 
Offline

Joined: Wed Jul 27, 2011 10:12 am
Posts: 330
Location: Hong-Kong
Hello,

I did not finish learning all CSS details... :oops: and I am a bit lost with IP menus.

But before searching further, I would like to know if it is possible.

I have 2 visible menu levels, in the menu mgt, I have a 3 (perhaps soon 4) levels of invisible pages.
Theses invisbles pages can be accessed by a link inside a level 2 page, not by the menus.

I would like to have the father, level 2 menu, highlighted if one of its child (level 3 or 4) is selected/visible on screen.

When a level 3 page is selected, I have only level 1 menu item highlighted, not the level 2 menu item.

For level 1 alone or level 1 with a selected level 2, highligths are corrects.

My css is here: http://www.vouilZZZZZlemin.com/import-e ... t/site.css

Thanks a lot.


Top 
 Profile  
 
 Post subject: Re: Highlight menu if invisible page is selected?
 Post Posted: Tue Jan 10, 2012 9:52 pm 
Offline
Project Developer

Joined: Tue Apr 28, 2009 9:43 am
Posts: 1720
This could be done using just CSS:

Quote:
I have 2 visible menu levels, in the menu mgt, I have a 3 (perhaps soon 4) levels of invisible pages.
Theses invisbles pages can be accessed by a link inside a level 2 page, not by the menus.

I would like to have the father, level 2 menu, highlighted if one of its child (level 3 or 4) is selected/visible on screen.


This needs some PHP:

Quote:
I would like to have the father, level 2 menu, highlighted if one of its child (level 3 or 4) is selected/visible on screen.

When a level 3 page is selected, I have only level 1 menu item highlighted, not the level 2 menu item.


There are plenty ways of doing that. I think one of the most important code samples for you would be:

Code:
echo $site->getCurrentElement()->getDepth();


You can use this line at the top of ip_themes/ip_default/main.php file and include CSS files depending on current page depth. So using this line and several different CSS files you can achieve everything you have mentioned.


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 2 posts ] 

Board index » Development » Help requests


 
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 post attachments in this forum

Search for:
Jump to:  
cron