Hide only one item in menu2

cgan

Avatar: cgan

2012-05-28 21:04

Hello,
When I'm on page order form I want one of the items in menu2 to be hidden. I know I can use a separate theme to make the whole menu2 hidden but I want just one item to be hidden.
Is that possible?
Best regards

» Quick.Cart v4.x

cgan

boboo

Avatar: boboo

2012-05-28 22:24

I just took a fresh qc42free, so I use the "virgin" page IDs in this example:
order page: id = 16,
and we want to disappear only the rules&policies (id = 4) if the order page is displayed.

so we take the function throwMenu in core/pages.php
direct under the line:
foreach( $this->mData[0] as $iPage => $bValue ){
add:
if(!($iPageCurrent==16&&$iPage==4)){
and direct under:
$i++;
add:
}
Thats all.
The numbers by iPageCurrent and iPage are IDs of orderpage and the page that should disappear from menu.

qc-plugins.kimla.de

cgan

Avatar: cgan

2012-05-29 00:05

Thanks boboo,
absolutely brilliant. I remember there were a few more pages ($iPageCurrent) that needed this menu item hidden so I modified like this:
if(!(($iPageCurrent==16||$iPageCurrent==17||$iPageCurrent==18)&&$iPage==4)){
And it works very well.
Best regards

cgan

Back to top
about us | contact