List of links widget
List of links widgets can display a list of links on a Library, IP, IPV, or Saved query.
To display a list of links on an object, set an attribute on that object with a specific value. The attribute name is used as the name of the widget.
The attribute value should be a JSON string, with the following fields:
- display: links
-
widgetHeader (optional): If provided, the markdown enabled text is displayed in the widget header. If omitted, the widget header will not be displayed.
- data: Array of objects. Each object contains a "name" field and a "url" field
Add a widget with two links to the 'drinks' LIBRARY. Note the '.' right after the Library name - this indicates to Perforce IPLM that we are setting the attribute on a Library.
List of links widget example - Command line
pi ip attribute set drinks.cosmo@2.TRUNK LINKS '{"display": "links", "data": [{"name": "Google","url": "http://www.google.com"}, {"name": "Yahoo","url": "https://www.yahoo.com"}]}'
List of links widget example - Formatted JSON
{ "display": "links", "data": [{ "name": "Google", "url": "http://www.google.com" }, { "name": "Yahoo", "url": "https://www.yahoo.com" }] }
IPLM Web output