WebsiteBaker Community Forum
WebsiteBaker Support (2.8.x) => Templates, Menus & Design => Topic started by: weiry on February 25, 2009, 01:48:15 AM
-
Hi,
Is there a way to include a menu link inside the index.php file? I have created a menu link to the WB backend once a user logs in through the front end. The page is private so it shows up once they login. However, I don't want to include this in the menu bar, I want to include it in the side column, underneath the Login box once they have logged in.
Anyone?
-
You could do something like this in your template beneath the login (code not verified)
if ($wb->get_session('GROUP_ID')==1) {
echo "<h2><a href=\"" . ADMIN_URL . "/index.php\">Admin</a></h2>;";
}
-
Hello,
use different menues and set the privat page to your "second" menu wich you then can call in your sidebar.
http://help.WebsiteBaker.org/pages/en/advanced-docu/designer-guide/multiple-menus.php (http://help.WebsiteBaker.org/pages/en/advanced-docu/designer-guide/multiple-menus.php)
Matthias
-
Both great suggestions.
Matthias, I did think about using a second menu, but didn't want to go to that extent, just for one page. If I had more pages that were Private then this would be a perfect solution and I will use it when that case arises.
Marathoner, code excellent. Just missing the php tags from and end and one too many of these ";" after the </h2> tag, but perfect!
Thank you both for your time. :-)