I want to be able to attach a menu to a specific page...right?
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Invalid
|
Medium
|
Steve Alexander |
Bug Description
I've got this page:
http://
on which I want to drape a set of Malone menu tabs. I attempted to start defining this menu like this (untested):
class FileBugFormMenu
"""Malone application menu when filing a bug."""
usedfor = IBugAddForm
def context_bugs(self):
buglist_url = self._get_
return Link(
def filebug(self):
filebug_url = self._get_
return Link(
def showreports(self):
bugs_url = self._get_
target = bugs_url + "/+advanced"
return Link(target=target, text="Show Reports",
def _get_context_
"""Return the canonical URL of the bug context."""
return canonical_
Two things then occurred to me:
1. The context of the +filebug form is an IProduct or an IDistribution, not an IBugAddForm (or something else, but let's ignore the other details for now.)
2. If I go ahead and correct this, by, say a menu defined on IProduct, I'm going to end up inadvertently adding a menu to:
http://
which, of course, I don't want to do.
I want to be able to do say "use this menu for the +filebug view" in ZCML, something like, e.g.
<browser:
...
Changed in launchpad: | |
assignee: | nobody → stevea |
status: | New → Accepted |
You can get the effect you want by adding the link to the application menu for the bugs facet. That is, the menu that is shown only when the bugs facet is selected.