Welcome, Guest. Please login or register.
Did you miss your activation email?
February 13, 2012, 03:14:50 AM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
149700 Posts in 21103 Topics by 7538 Members
Latest Member: ionline
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: [SOLVED]Menu disappears when in frontend user preferences.  (Read 465 times)
aesteves

Offline Offline

Posts: 4


« on: February 04, 2010, 07:06:40 PM »

Hi all.

Problem:

in a multilingual site, I don't want the first level of menus to be visible (the first level has two entries, one for each language). This is the easy part. I have put it to work with both show_menu and show_menu2. The problem is when a user goes to his preferences page the menu disappears.
If I leave all the menu levels visible this doesn't occur.

Any ideas what the problem may be?

Thanks,

ap
« Last Edit: February 05, 2010, 12:35:21 AM by aesteves » Logged
Luisehahne
Board Member
Development Team
*****
Offline Offline

Posts: 2952



WWW
« Reply #1 on: February 04, 2010, 10:29:23 PM »

Yes that is normal, all Menues greater level 0 like your will be not shown, It too happens in search and login

Dietmar
Logged

We are human beings - and nobody is perfect at all.
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1680



« Reply #2 on: February 04, 2010, 10:37:41 PM »

In login.php/signup.php and maybe more files in account folder,there is a piece of code:

Code:
define('PAGE_ID', 0);
define('ROOT_PARENT', 0);
define('PARENT', 0);
define('LEVEL', 0);
define('PAGE_TITLE', $TEXT['PLEASE_LOGIN']);
define('MENU_TITLE', $TEXT['PLEASE_LOGIN']);
define('VISIBILITY', 'public');

I guess you can define here which menu level you want to be shown..
Logged

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
aesteves

Offline Offline

Posts: 4


« Reply #3 on: February 05, 2010, 12:34:36 AM »

Thanks for the attention.

After finding out that it was the same problem that use to happen on the search page with show_menu2, tried a few times to hard code the variable PAGE_ID or REFERRER_ID here and there with no results at all.

The solution is to append a get variable in the link to the preferences page (below the login form in the frontend - after the login is made of course).

Like this:

Where it use to be:
<a href="<?php echo PREFERENCES_URL; ?>">

is now:

<a href="<?php echo PREFERENCES_URL."?referrer=".PAGE_ID; ?>">

Probably you can check if the REFERRER_ID exists and put there, if not PAGE_ID, but this solution works for me.

Thanks again for everything!

Cheers

AP
Logged
Luisehahne
Board Member
Development Team
*****
Offline Offline

Posts: 2952



WWW
« Reply #4 on: February 05, 2010, 02:24:12 AM »

Quote
I guess you can define here which menu level you want to be shown

It's not so easy. I already try this to let some constants as is. If you do so, you got many issues, if want to call this urls by menu_link.

Dietmar
Logged

We are human beings - and nobody is perfect at all.
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!