l.s.w.i.ILink(ILinkData) : interface documentation

Part of lp.services.webapp.interfaces View In Hierarchy

Known subclasses: lp.services.webapp.interfaces.IFacetLink

An object that represents a link in a menu.

The attributes name, url and linked may be set by the menus infrastructure.

Attribute name The name of this link in Python data structures.
Attribute url The full url this link points to. Set by the menus infrastructure. None before it is set.
Attribute path The path portion of the URL.
Attribute linked A boolean value saying whether this link should appear as a clickable link in the UI. The general rule is that a link to the current page should not be shown linked. Defaults to True.
Attribute enabled Boolean to say whether this link is enabled. Can be read and set.
Attribute escapedtext Text string, escaped as necessary.
Attribute icon_url The full URL for this link's associated icon, if it has one.
Method render Return a HTML representation of the link.

Inherited from ILinkData:

Attribute target The place this link should link to. This may be a path relative to the context of the menu this link appears in, or an absolute path, or an absolute URL.
Attribute text The text of this link, as appears underlined on a page.
Attribute summary The summary text of this link, as appears as a tooltip on the link.
Attribute icon The name of the icon to use.
Attribute site The name of the site this link is to, or None for the current site.
Attribute menu The INavigationMenu associated with the page this link points to.
Attribute sort_key The sort key to use when rendering it with a group of links.
Attribute hidden Boolean to say whether this link is hidden. This is separate from being enabled and is used to support links which need to be enabled but not viewable in the rendered HTML. The link may be changed to visible by JavaScript or some other means.
name =
The name of this link in Python data structures.
url =
The full url this link points to. Set by the menus infrastructure. None before it is set.
path =
The path portion of the URL.
linked =
A boolean value saying whether this link should appear as a clickable link in the UI. The general rule is that a link to the current page should not be shown linked. Defaults to True.
enabled =
Boolean to say whether this link is enabled. Can be read and set.
escapedtext =
Text string, escaped as necessary.
icon_url =
The full URL for this link's associated icon, if it has one.
def render():
Return a HTML representation of the link.
API Documentation for Launchpad, generated by pydoctor at 2019-12-13 00:00:05.