Ever pulled your hair out trying to navigate to a specific page, one buried deep in the navigation hierarchy? Wish you could simply type in a short, simple URL?
Now the portal includes quick links to make navigating simpler.
For example, an administrator could assign the quick link “eats” to the page from which you order dinner. You could then get to the page by typing in something like:
even if the page was buried who-knows-where in the portal.
Assigning Quick Links (Roles Connector)
For navigation nodes based on the roles connector, administrators can assign a quick link to a page or iView by setting the node’s Quick Link property in the property editor. The property is listed in the Navigation category, as shown below:
You do have to be careful not to assign the same quick link to two or more nodes — there’s nothing that stops you and there’s no easy way to check if two nodes have the same quick link.
If you assign the same quick link twice, the quick link takes you to the first node that was assigned the quick link.
Assigning Quick Links (Other Connectors)
Any custom navigation connector that you create must implement its own mechanism for collecting and storing quick links.
When the navigation service receives a request for a navigation node based on a quick link, it queries the existing navigation connectors by calling the connector’s getNodeByQuickLink() method, which returns a javax.naming.NamingEnumeration with the corresponding INavigationConnectorNode node.
The following is the signature for the getNodeByQuickLink() method:
public NamingEnumeration getNodeByQuickLink( Hashtable environment, String quickLink);
You can implement any logic for returning an INavigationConnectorNode node based on the quick link passed into the method.
The Navigation service queries each navigation connector, one at a time, until it finds one that returns a node for the quick link. There is no guarantee which navigation connector is queried first.
Changes to Navigation Connector API
The getNodeByQuickLink() method is part of a new extended navigation connector interface, INavigationConnectorExt. In order to add methods to the navigation connector API but keep the portal backward compatible with existing connectors, the existing INavigationConnector interface was unchanged and the new INavigationConnectorExt interface was created.
The interface defines two new methods, getNodeByQuickLink() mentioned above and getConnectorCacheDiscriminator() for enabling navigation caching for the connector (this method is explained in another weblog on navigation caching).
To avoid similar problems in the future, it is now recommended to create navigation connectors by extending the new class AbstractNavigationConnector instead of implementing the INavigationConnector or INavigationConnectorExt interfaces.
The following are the weblogs in the series on External Facing Portal:
- Nuts and Bolts of the External Facing Portal (EFP)
- EFP: Navigation and Framework Tag Libraries
- EFP: Layout Tag Library
- EFP: Navigation Caching
- EFP: Quick Links
- EFP: Short URLs