You are here: Foswiki>Tasks Web>Item3647 (08 Jan 2009, KwangErnLiew)Edit Attach

Item3647: Usability: Control over variable expansion in topic templates

pencil
Priority: Enhancement
Current State: Closed
Released In: 1.0.0
Target Release: patch
Applies To: Engine
Component:
Branches:
Reported By: TWiki:Main.PeterThoeny
Waiting For: TWiki:Main/PeterThoeny
Last Change By: KwangErnLiew
The "My links" section of new user homepages has this:
   * %TWIKIWEB%.ATasteOfTWiki - view a short introductory presentation on TWiki for beginners
   * %TWIKIWEB%.WelcomeGuest - starting points on TWiki
   * %TWIKIWEB%.TWikiUsersGuide - complete TWiki documentation, Quick Start to Reference
   * Sandbox.%HOMETOPIC% - try out TWiki on your own
   * Sandbox.%TOPIC%Sandbox - just for me

Although accurate and correct to use TWiki variables, it can be initimidating to new users. For education purposes it is better to expand the variables (just in the "My links" section) to show:
   * TWiki.ATasteOfTWiki - view a short introductory presentation on TWiki for beginners
   * TWiki.WelcomeGuest - starting points on TWiki
   * TWiki.TWikiUsersGuide - complete TWiki documentation, Quick Start to Reference
   * Sandbox.WebHome - try out TWiki on your own
   * Sandbox.JimmyNewtronSandbox - just for me

Yes, expanded %TWIKIWEB% name and expanded %HOMETOPIC% do not work if at a later point the admin decides to name them TWikiDocs and StartingPoint, respectively. The chance is pretty low that this is done after the initial TWiki deployment. At deployment it may happen though, so the template should list the variables, but once instanciated they should get expanded.

Idea: Create a %EXPANDVARS{}% variable that can be put into template topics. Example:
   * %EXPANDVARS{%TWIKIWEB%}%.ATasteOfTWiki - view a short introductory presentation on TWiki for beginners
   * %EXPANDVARS{%TWIKIWEB%}%.WelcomeGuest - starting points on TWiki
   * %EXPANDVARS{%TWIKIWEB%}%.TWikiUsersGuide - complete TWiki documentation, Quick Start to Reference
   * Sandbox.%EXPANDVARS{%HOMETOPIC%}% - try out TWiki on your own
   * Sandbox.%EXPANDVARS{%TOPIC%Sandbox}% - just for me

-- TWiki:Main/PeterThoeny - 15 Feb 2007

New core feature. Should be a Codev topic added to TWiki:Codev.TWikiFeature04x02 per our process. Great idea by the way.

-- TWiki:Main.KennethLavrsen - 15 Feb 2007

I created TWiki:Codev.ControlOverVariableExpansion

-- TWiki:Main.PeterThoeny - 16 Feb 2007

Marking as Enhancement.

CC

This is work in progress. Code changes should be done. Doc changes and homepage change pending.

I would appreciate if someone could help out with the unit tests.

-- PeterThoeny - 28 May 2007

Please consider Item1855 when you do this. Thanks.

-- TWiki:Main.CrawfordCurrie - 22 Jun 2007

ItemTemplate edit

Summary Usability: Control over variable expansion in topic templates
ReportedBy TWiki:Main.PeterThoeny
Codebase trunk
SVN Range TWiki-4.1.1, Wed, 14 Feb 2007, build 12874
AppliesTo Engine
Component
Priority Enhancement
CurrentState Closed
WaitingFor TWiki:Main/PeterThoeny
Checkins distro:0e5e702360e8 distro:1934b507fb1c
TargetRelease patch
ReleasedIn 1.0.0
Topic revision: r13 - 08 Jan 2009, KwangErnLiew
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy