WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.8 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Menu link inside index.php
  • Print
Pages: [1]   Go Down

Author Topic: Menu link inside index.php  (Read 4575 times)

Offline weiry

  • Posts: 92
Menu link inside index.php
« 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?
Logged

Offline marathoner

  • Posts: 495
Re: Menu link inside index.php
« Reply #1 on: February 25, 2009, 04:36:02 AM »
You could do something like this in your template beneath the login (code not verified)

Code: [Select]
if ($wb->get_session('GROUP_ID')==1) {
echo "<h2><a href=\"" . ADMIN_URL . "/index.php\">Admin</a></h2>;";
}
Logged

Offline ruebenwurzel

  • Betatester
  • **
  • Posts: 8544
  • Gender: Male
  • Keep on Rockin
    • Familie Gallas Online
Re: Menu link inside index.php
« Reply #2 on: February 25, 2009, 06:51:08 AM »
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

Matthias
Logged

Offline weiry

  • Posts: 92
Re: Menu link inside index.php
« Reply #3 on: February 26, 2009, 01:03:05 AM »
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. :-)
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Menu link inside index.php
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2