All child items hidden, but parent menu item still gets "menuparent" class

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
vaughnt
Forum Members
Forum Members
Posts: 82
Joined: Tue Jun 13, 2006 2:05 pm

All child items hidden, but parent menu item still gets "menuparent" class

Post by vaughnt »

Hello-

Apache 1.3.33
PHP 4.3.9
MySQL 4.0.27-standard

I'm running CMSMS 1.0.1, using the vertical CSS menu.  Here is the situation:
-I have a top-level (parent) menu item (not a child of any other item)
-I create one or more child items under the Parent, and uncheck the "show in menu" option on each one.
-When I view the menu, I get the arrow indicating there are subitems. The menu gets the "menuparent" CSS class.

This is an incorrect behavior, as it has no child items to show.

If you are wondering why I'm hiding all the child items, it is because I have a Parent item with many children, so many the popout menu goes off the bottom of most screens. I am providing for alternate navigation, but I need to fix the menu appearance.

First, I'd like to know if anyone else can reproduce this, it should be easy enough to test.

Second, I'm hoping there a fix or workaround for this. I searched the forums and didn't find anything, but I may not have hit on the right keywords. Any ideas?

Thank you-

Vaughn
Last edited by vaughnt on Wed Sep 20, 2006 12:14 am, edited 1 time in total.
--
My photography: http://vaughnsphotoart.com
Festiva Resorts: http://www.festiva.travel
vaughnt
Forum Members
Forum Members
Posts: 82
Joined: Tue Jun 13, 2006 2:05 pm

Re: All child items hidden, but parent menu item still gets "menuparent" class

Post by vaughnt »

Anybody able to confirm this?
--
My photography: http://vaughnsphotoart.com
Festiva Resorts: http://www.festiva.travel
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: All child items hidden, but parent menu item still gets "menuparent" class

Post by Dr.CSS »

It's coming from the menu template which you can change, either by using a diff. one or making a copy and taking that call out or you can go to the style sheet and comment out the line for the arrow.
vaughnt
Forum Members
Forum Members
Posts: 82
Joined: Tue Jun 13, 2006 2:05 pm

Re: All child items hidden, but parent menu item still gets "menuparent" class

Post by vaughnt »

I was afraid you'd say that.  ;)

I've already mucked about in menu manager & the nav stylesheet, so if I need to turn the arrows off entirely I can.  But fixing the output of:

{elseif $node->haschildren == true}
<a class="menuparent"

so it doesn't return true when all the children are hidden is beyond my abilities. I tried tracking it down in MenuManager.module.php but don't know php, and couldn't figure it out.


Thank you,
Vaughn
--
My photography: http://vaughnsphotoart.com
Festiva Resorts: http://www.festiva.travel
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: All child items hidden, but parent menu item still gets "menuparent" class

Post by tsw »

its quite deep in the core

class.content.inc.php HasChildren function, I think it cant be changed there becouse it might brake quite a few places.

maybe Ill just add HasVisibleChildren function there...
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: All child items hidden, but parent menu item still gets "menuparent" class

Post by Dr.CSS »

How about taking them out from under a page and just have it in the first level w/o parents...
Bradleyenator

Re: All child items hidden, but parent menu item still gets "menuparent" class

Post by Bradleyenator »

Has anyone found a solution to this??? Has that function "HasVisibleChildren" been created??

As I am having a similar problem. I am using my own custom Menu Template and CSS and when you un-tick "Show in Menu" it stuffs up my menu. Is there a way I can somehow make a direct DB call or something to see if that box has been ticked or not from within a Menu Template???
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: All child items hidden, but parent menu item still gets "menuparent" class

Post by RonnyK »

I also set pages to be "inactive". That way they don't show as childs. For pages I do need to be active, but not visible in the menu, f.e. "thankyou", "resultpages" etc.. I've created a parent that is not visible in the menu and has all "not visible" children.

Ronny
Locked

Return to “CMSMS Core”