Modify

Opened 10 years ago

Last modified 3 years ago

#2857 assigned enhancement

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

Reported by: roman.doroschevici@… Owned by: Ryan J Ollos
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 10 years ago.
Python Egg of the ProjectMenuPlugin with the changes of comment:2
web_ui.patch (1.1 KB) - added by izzy 10 years ago.
Patch to the ProjectMenuPlugin with the changes of comment:2

Download all attachments as: .zip

Change History (7)

comment:1 Changed 10 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 10 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 10 years ago by izzy

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

Changed 10 years ago by izzy

Attachment: web_ui.patch added

Patch to the ProjectMenuPlugin with the changes of comment:2

comment:3 Changed 8 years ago by Adrian Fritz

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

comment:4 Changed 3 years ago by Ryan J Ollos

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

comment:5 Changed 3 years ago by Ryan J Ollos

Owner: changed from Noah Kantrowitz to Ryan J Ollos
Status: newassigned

Modify Ticket

Change Properties
Set your email in Preferences
Action
as assigned The owner will remain Ryan J Ollos.

Add Comment


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

 
Note: See TracTickets for help on using tickets.