Tags:
create new tag
, view all tags
The edit script expands the following variables for WebTopicEditTemplate:

Variable Explanation
%DATE% Current date
%USERNAME% Login name of contributor, e.g. "jdoe"
%WIKINAME% WikiName of contributor, e.g. "JonDoe"
%WIKIUSERNAME% Web.WikiName of contributor, e.g. "Main.JonDoe"
%URLPARAM{"name"}% Expand URL parameters
%NOP{...}% Gets removed. Use it to remove access control from the template topic
%NOP% Gets removed. Use it to prevent search from hitting the template topic

ExpandVariablesInNewUserTemplate is done for the same variables.

-- PeterThoeny - 18 Oct 2003

The variables %USERNAME% and %WIKINAME% are new as of today. See ExpandUsernameAndWikinameInTemplateTopics.

-- PeterThoeny - 18 Oct 2003

Wouldn't it be better to expand them all?

-- MartinCleaver - 18 Oct 2003

No, because that would break existing templates that have variables like %SEARCH{}% etc. The addition of the new %USERNAME% and %WIKINAME% variables can be justified because they are close enough to the existing %WIKIUSERNAME%.

A better solution is to introduce a new variable where all enclosed variables are expanded, e.g.:

%EXPAND{ %SCRIPTURL%, %SEARCH{...}%, %CALC{...}%, etc }%

-- PeterThoeny - 18 Oct 2003

This would be good... although it would have to be %EXPAND% ... ... ... %ENDEXPAND% or similar to avoid parsing problems.

I have an immediate need for %SEARCH{..}% to be expanded from an edit template. It goes like this:

  • CodeReviewChecklist page contains a %SEARCH{}% which gathers a table of review checklist items (from TWiki Forms)
  • User hits 'Create new review page' button which does an edit?templatetopic=CodeReviewChecklist to clone a snapshot of the checklist
  • User can then annotate individual review checklist items in his end page (i.e. I want the table expanded with a |table|format| as if it had been manually typed.)

-- GordonAllan - 14 Nov 2003

This discussion is similar to the needs presented in SearchInINCLUDE. There may be a way to combine these.

-- RaymondLutz - 15 Nov 2003

Note that the patch I just posted to SaveContentWithoutEdit also gathers up the variables described above into a single function in TWikiDotPm.

-- CrawfordCurrie - 10 Feb 2004

Feature bunped to Dakaar release due to lack of progress.

-- CrawfordCurrie - 30 Jun 2004

Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r10 - 2005-02-16 - CrawfordCurrie
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.