|Title|Personal Links
|Date|02-Nov-2006 19:42:19 EET
|JSPWiki version|2.4.72
|[Idea Category]|TemplateIdea
|Reference|none - lives on an intranet
|[Idea Status]|NewIdea

I had read some time ago that some folks were trying to do "Personal Links."  I did something similar to what someone described in [IdeaPersonaLeftMenu] only I added it as a header line underneath the breadcrumbs.  I just call it Personal Links as it deals with links that are established on a per-user basis.  You login, and the template then searches for a file called:


and inserts that under the breadcrumbs.

The only mods necessary are in the ViewTemplate.jsp:

            <td colspan="2" class="breadcrumbs">Your trail: <wiki:Breadcrumbs /></td>
            <td colspan="2" class="breadcrumbs">Your links: <wiki:Include page="PersonalLinks.jsp" /></td>

And then, the PersonalLinks.jsp has this code, as well (as other standard JSPWiki stuff at the top):


  AuthorizationManager mgr = wiki.getAuthorizationManager();
  UserProfile currentUser  = wiki.getUserManager().getUserProfile( request );
  String who = currentUser.getName();
  who += "_Menu";

<wiki:UserCheck exists="true">
  <wiki:InsertPage page="<%= who %>" />
  <a href="Edit.jsp?page=<wiki:UserName />_Menu" title="Edit your links">Edit links</a>
  <wiki:InsertPage page="<wiki:UserName />_Menu" />


If it doesn't find a username_menu then nothing displays after the:

Your links:

on the header of the Wiki page.  There's no reason why you could not put this on the left menu, or anywhere else on the template for that matter.

Have fun!



The default template already does this.  E.g. ScottyFavorites shows up on your LeftMenu, if your username is Scotty.

-- JanneJalkanen