Opened 9 years ago

Last modified 3 weeks ago

#3632 assigned enhancement

provide or document ways to use variables in custom items

Reported by: Clif Kussmaul Owned by: Ryan J Ollos
Priority: low Component: NavAddPlugin
Severity: trivial Keywords:
Cc: Clif Kussmaul, Ryan J Ollos Trac Release: 0.11


It would be very nice for custom menu items to be able to variables, such as the current user, the current wiki topic, ticket number, etc.

Please consider adding this, or documenting examples of how to do it.

Attachments (0)

Change History (4)

comment:1 Changed 8 years ago by Michael Renzmann

I'm not sure I understand what you request. Can you please describe a more detailed description of your idea?

comment:2 Changed 8 years ago by Clif Kussmaul

I want to create custom menu items with titles or URLs that are not completely static, but depend on other information in trac, such as the current user, current topic, current ticket number, etc. This would add considerable power & flexibility.

For example, we could create custom menu items to:

  • custom query showing tickets for the current user
        mytickets.title  = Tickets for $USER
        mytickets.url    = .../query?owner=$USER
  • actions for the current wiki page:
        pageattach.title = Attach
        pageattach.urk   = .../wiki/$PAGE?action=attach
        pagedelete.title = Delete
        pagedelete.urk   = .../wiki/$PAGE?action=delete
        pageedit.title   = Edit
        pageedit.url     = .../wiki/$PAGE?action=edit
  • actions for the current ticket
        samecomp.title   = Same Component
        samecomp.url     = .../query?component=$COMPONENT
        samemile.title   = Same Milestone
        samemile.url     = .../query?milestone=$MILESTONE
Last edited 3 weeks ago by Ryan J Ollos (previous) (diff)

comment:4 Changed 8 years ago by Ryan J Ollos

Cc: Ryan J Ollos added

comment:5 Changed 3 years ago by Ryan J Ollos

Owner: changed from Michael Renzmann to Ryan J Ollos
Status: newassigned

Modify Ticket

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.