Tags:
create new tag
, view all tags

Pattern Skin : dynamic WebLeftBar

Main idea

Using a TWiki variable (%LEFTMENU% for example), to define left menu content rather than a hard coded topic gives possibility to have left menu content defined fot
  • TWiki site --> TWikiPreferences
  • WEB --> WebPreferences
  • TOPIC --> per user/group menu via personal/group home page, or in any other topic where a specific menu is required
  • via plugin --> unlimited power (thank's to TWiki !)

Suggested changes

Just replace in file templates/viewleftbar.pattern.tmpl

-
%TMPL:DEF{"webleftbar"}%%INCLUDE{"%WEB%.WebLeftBar"}%%TMPL:END%

by

%TMPL:DEF{"webleftbar"}%%LEFTMENU%%TMPL:END%

and in TWikiPreferences , add var %LEFTMENU% :

   * Set LEFTMENU = %INCLUDE{"%WEB%.WebLeftBar"}%

That's all

Why ?

This idea is inspired from GnuSkin and has been widly appreciate by users of our TWiki. We use this feature in some specifics topics:
  • forum topics
  • brainstorming topics
  • poll voting topics (see Poll Plugin)
  • etc ...
. and some users/groups like to define their own left menu. For example, guest users have a specific left bar menu, just seting the LEFTMENU var in guest user home page.

Last point is that this solution makes TWiki upgrade easier by giving the possibility to define a global web menu , just setting :

   * Set LEFTMENU = %INCLUDE{"%TWIKIWEB%.WebLeftBar"}%

_note_ : per web topic list can be defined in WebPreferences (%WEBTOPICLIST% )

I hope you will appreciate this idea.

-- PatrickNomblot - 22 Jun 2006

Sounds like a good enhancement.

-- ArthurClemens - 22 Jun 2006

 
Topic revision: r3 - 2006-06-23 - PatrickNomblot
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by PerlIdeas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.