Bug: TWikiVariables don't seem to display consistently in templates
There seems to be some difference between different types of variables, and the way they are displayed in templates.
I like to create new pages based on semi-built templates, such as in the
NewBugTemplate for creating a new
BugReport. In the
NewBugTemplate example, there are some
TWikiVariables such as
%DATE% and
%WIKIUSERNAME%. When a new bug report is created using that template, I see something like this:
-- Main.RossC - 16 Oct 2002
when editing the new bug report. However, let's say I want to track the time of the bug report creation, so I include the variable variable
%GMTIME% (or
%SERVERTIME% for that matter) in the
NewBugTemplate. In this case, I see:
-- Main.RossC - GMTIME
i.e. the variable is not expanded to its value. ( Yes, the appropriate % signs do show up. Still struggling here with
VerbatimExpandsVariables)
Why does this happen 'correctly' for the
%DATE% and
%WIKIUSERNAME% variables, but not for some others?
Test case
Environment
| TWiki version: |
TWikiRelease01Dec2001 |
| TWiki plugins: |
|
| Server OS: |
|
| Web server: |
|
| Perl version: |
|
| Client OS: |
|
| Web Browser: |
|
--
RossC - 16 Oct 2002
Follow up
The current spec is that only
%DATE%,
%WIKIUSERNAME% and
%URLPARAM{...}% are expanded, and
%NOP% is removed.
There are cases where other variables should get / should not get expanded. See related topics
MoreExpansionInTemplateTopic,
ExpandUrlParamForNewTopics
--
PeterThoeny - 20 Oct 2002