News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

Menu Link Error

Started by mem1988, January 05, 2011, 05:38:34 PM

Previous topic - Next topic

mem1988

Hello,
I am currently running SMF 2.0 RC4 on a brand new installation.
I tried to make a new menu button like this way:
http://www.simplemachines.org/community/index.php?topic=261880.0

all works fine, the link works pretty...
...but if i go to the new site, the new menu button isn't marked as active.


Ashley S

Can you click it? Have you added a hyper link to it to make it redirect you to a php page.
Are you sure you followed the Tutorial?.

mem1988

YES, I can click it.
NO, I didn't added a HyperLink... I've added a "?action=" Link.
YES, I'm sure I followed the Tutorial.

my problem is just that the link will not shows as "marked active"

Kays

Hi, can you post the code for that button?

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

mem1988

#4
Sources/Subs.php

$buttons = array(
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
),
'portalseite' => array(
'title' => 'portalseite',
'href' => $scripturl . '?action=hallo',
'show' => true,
'sub_buttons' => array(
),
),
'help' => array(
'title' => $txt['help'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(
),
),


and this is my code..

'portalseite' => array(
'title' => 'portalseite',
'href' => $scripturl . '?action=hallo',
'show' => true,
'sub_buttons' => array(
),
),


I think... there is maybe a part in Source or Template where I have to set "portalseite" ... ??? idk ???

Kays

Actually what you need to do make the button name the same as the action. This should work.


         'hallo' => array(
            'title' => 'portalseite',
            'href' => $scripturl . '?action=hallo',
            'show' => true,
            'sub_buttons' => array(
            ),
         ),

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

mem1988

thank you.. it works... thank you very much...

Kays


If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Advertisement: