Skip to Content
avatar image
Former Member

QuickLink question

Hi All,

With SP14 we have this new feature in Portal where we can define a QuickLink for certain Pages/IViews. Now my problem is if the user types in a wrong quicklink or a quicklink to a page he doesn't have access to, portal always throws the First Page of the users role. Is there a way to throw a custom message if the quicklink is wrong or is not found.

Any help in this regard will be appreciated.

Thanks

Ankur

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Apr 16, 2006 at 01:06 PM

    Hi Ankur,

    The answer comes in 2 parts:

    • Before there were quick links, if a user entered http://server:port/irj/portal/XYZ, the portal recognized the irj/portal alias, ran the portallauncher portal application, which gave you the desktop/framework page. The XYZ was discarded.

    Now with Quick Links, there is a desire to have the same functionality. If someone types in a bad quick link, it is considered like always just extra characters on the URL, and is discarded.

    • You could write an invisible iView and put it in the framework page. You can check if there was a quicklink entered and whether it is valid. If not, you could redirect to an error page.

    Do something like this to check the quick link:

    //See if a QL was entered
    String quickLink = request.getParameter(INavigationConstants.QUICKLINK_PARAM);
    
    //If QL is not blank, see if the QL is valid and returns a valid node
    INavigationService service = (INavigationService) PortalRuntime.getRuntimeResources().getService(INavigationService.KEY);
    
    INavigationNode myNode = service.getNodeByQuickLink(Hashtable environment, String quickLink);
    
    // Now check if myNode is not null. If it is null, redirect to error page.

    Hope this helps.

    Daniel

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Daniel,

      Firstly my apologies for not responding quickly. This is exactly what I was thinking too. Thanks for endorsing what I was thinking too. Let me try to implement what you have suggested. I will give you full points, unless I have any further questions.

      Thanks again for attending this. I will return back and mark it as solved.