Jump to content
TNG Community

Additional link on main menu


quarlton

Recommended Posts

I'm trying to add a single extra link on the main menu (Template 12 in this example)

Link would go to browsebranches.php (as an example - yes I know it's under Info)

I can find out how to create extra drop-down menus but not a single link.

Could anyone point me in the right direction please.

 

Many thanks

Dave

Link to comment
Share on other sites

edglimited

By Main Menu, I'm guessing you mean, the Ribbon Menu Bar.

As mentioned to you, the other day in the other thread, changing the code will give you a headache. Easiest options.:

I suggested to you, the best and easiest way was to "add a button" in your ribbon menu. (see 1st pic - mines called private) logged out you cant view anything.

This stops leeches from viewing your links etc. Think of it as a security feature.!! Members only can view what's in it.

Within that "button" , you can have as many links as you want, to anyone you want, including external sites. (see 2nd pic) logged in, you see this.

The Mod, that Michel refers to, will work, but you must be running TNG 13.0 .....it will also place a button on the ribbon menu as well. (see 3rd pic)

As an FYI, I use Michels Admin Mod, not this one..

Drew..

Screenshot from 2022-05-05 09:04:00.png

Screenshot from 2022-05-05 09:14:28.png

Screenshot from 2022-05-05 09:17:33.png

Edited by edglimited
error correction
Link to comment
Share on other sites

Many thanks Michel & Drew for your input.

I can make both your suggestions work, unfortunately neither are quite what I am looking for.

Perhaps I haven't explained myself very well so I'll add a couple of images to explain.

  • Example using Michel's method - link appears at right of other items
  • menubuttonlink2.jpg 

 

  • Example using Drew's method - link is direct, no drop-down menu
  • menubuttonlink.jpg
  • I am trying to persuade my friend to change templates, but she likes the look of Template 12.

Many thanks for your input

Dave

Link to comment
Share on other sites

edglimited
17 hours ago, quarlton said:

Many thanks Michel & Drew for your input.

I can make both your suggestions work, unfortunately neither are quite what I am looking for.

Perhaps I haven't explained myself very well so I'll add a couple of images to explain.

  • Example using Michel's method - link appears at right of other items
  • menubuttonlink2.jpg 

 

  • Example using Drew's method - link is direct, no drop-down menu
  • menubuttonlink.jpg
  • I am trying to persuade my friend to change templates, but she likes the look of Template 12.

Many thanks for your input

Dave

 

Hi Dave, hope you are well......now I understand what you are looking for.

Michel's mod, Admin_Menu_Link  will work, (I use it) but it will only take you to the Admin area, you would still need to choose Branches, from the left hand menu. You could change the coding in his Mod, (in genlib.php) to direct to browsebranches.php, to suit what you (friend) want. (That could also be the creation of another Mod in itself). See if Michel is happy for you to do that.

You're friend can still use Template 12, there's no issue, my only concern was if you start changing the code, within the template itself, that's when things get real ugly.

I use Michel's mod, (without changes in genlib.php) in conjunction with another Mod, that takes me to where I want to go within TNG.

What I'm guessing is, you want to go to this.... pic.?????

Just want to line my ducks up....😀

 

 

 

Screenshot from 2022-05-06 13:14:18.png

Link to comment
Share on other sites

Michel KIRSCH

In the mod, the link is reserved for Administrators only.

 

If you want it for all users, these two lines of code are enough :

        $left_icons .= tng_smallIcon(array('url'=>"{$cms['tngpath']}browsebranches.php", 'label'=>'Branches', 'id'=>"branches"));
        $tngconfig['menucount']++;

you must insert it where you want in genlib.php between

    $left_icons = "";

and

    $profilelink = $userparen = "";

 

Link to comment
Share on other sites

Michel, Drew

Many thanks to you both for your kind help.

I've decided that my friend will have to either stick with Template 12 or, preferable, choose a different one.

The work entailed in modifying her template and then keeping it up to date is something I'm reluctant to do.

However, thanks to your posts, I have learned some useful extra knowledge about templates

Best wishes

Dave.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...