TitlePersonal Favorites in the LeftMenu
Date10-Sep-2005 22:29:24 EEST
JSPWiki versionany
SubmitterDirkFrederickx
Idea CategoryTemplateIdea
Reference
Idea StatusNewIdea

The LeftMenu is a good place for frequently used links. However, your favorites places in your wiki may differ from person to person.

This Idea proposes a convention for a Personal Favorites wiki page, starting with your UserName followed by ~Favorites: like [DFFavorites]

This convention would allow JSPWiki to include this page in the LeftMenu as soons as the user authenticated himself.

Here is some JSP code you can add to the LeftMenu to do the trick.

<%-- div class='myfavorites' --%>
<wiki:UserCheck status="known">
  <% 
    WikiContext c = (WikiContext) pageContext.getAttribute( "jspwiki.context",
                                                         PageContext.REQUEST_SCOPE ); 
    String username = null;
    try { 
          username = c.getEngine().getVariableManager().getValue(c, "username" );
        } catch( Exception  e )  { /* dont care */ }
    if( username == null ) username = "";
    String myFav = username + "Favorites";
  %>
  <wiki:PageExists page="<%= myFav %>">
  <div class="myfavorites"> 
    <wiki:LinkTo page="<%= myFav %>" >My Favorites</wiki:LinkTo>
    <wiki:InsertPage page="<%= myFav %>"/>
  </div>  
  </wiki:PageExists>
</wiki:UserCheck>

--DF


Sounds like good idea !

And similar: how about a personal "StartPage" , if you go to your wiki, you get your own StartPage (actually a page that's named <YourWikiName>StartPage, instead of the systemwide default. Offcourse only if you are asserted or logged in, and you have a personal StartPage defined.

Harry

--HarryMetske, 24-Sep-2006

Add new attachment

In order to upload a new attachment to this page, please use the following box to find the file, then click on “Upload”.
« This page (revision-4) was last changed on 08-Jun-2008 15:50 by JanneJalkanen