Modify

Opened 6 years ago

Last modified 4 years ago

#2857 new enhancement

[PATCH] How can i change the possition of the menu?

Reported by: roman.doroschevici@… Owned by: coderanger
Priority: normal Component: ProjectMenuPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

Can I change the project menu place, because it is not good in many themes?
Thanks.

Attachments (2)

TracProjectMenu-1.0-py2.4.egg (4.0 KB) - added by izzy 6 years ago.
Python Egg of the ProjectMenuPlugin with the changes of comment:2
web_ui.patch (1.1 KB) - added by izzy 6 years ago.
Patch to the ProjectMenuPlugin with the changes of comment:2

Download all attachments as: .zip

Change History (5)

comment:1 Changed 6 years ago by izzy

As it is, you can only move it inside the metanav bar (i.e. to the left or to the right) editing your projects conf/trac.ini. Search for the line starting with "metanav", which probably looks like

metanav = login,logout,settings,help,about

Now place the term "projectmenu" at the position you like it better, e.g.

metanav = projectmenu,login,logout,settings,help,about

But I'm afraid this won't suit better with your themes...

comment:2 Changed 6 years ago by izzy

I applied a few modifications to the latest code from the SVN repository, including the previously mentioned fixes from ticket #1393 and #1372. Additionally, in my version the SELECT element is stored in an environment variable named projectmenu.

What is the benefit from this latter change? Using the NavHiderPlugin, one can hide the select box from the metanav bar completely, and instead place it anywhere on the page, by e.g. adding the following fragment to the templates/header.cs file:

<?cs if:projectmenu ?><?cs var:projectmenu ?><?cs /if ?>

(probably it would even go into one <?cs .. ?> statement, but I'm not that familiar with it). If no special placement is required, it still goes to the metanav.

I will add the patch and the resulting Python-Egg as well - the latter for those not so familiar with patching stuff :) If someone is still working on this plugin, a decision may be taken to adopt this code to the SVN repository...

Changed 6 years ago by izzy

Python Egg of the ProjectMenuPlugin with the changes of comment:2

Changed 6 years ago by izzy

Patch to the ProjectMenuPlugin with the changes of comment:2

comment:3 Changed 4 years ago by AdrianFritz

  • Summary changed from How can i change the possition of the menu? to [PATCH] How can i change the possition of the menu?

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.