Question
Is the
WebPreferences/WikiPreferences the only place to set (custom) variables ?
If yes, how to limit the setting to specific topics ?
In an ordinary Topic the contents of:
------------- cut -------------
* Sample test of variable in Topic:
* Set TESTVAR = blabla
The variable is set to %TESTVAR%
------------- cut -------------
renders to exactly the same output as in the source. The variable is not replaced.
(There are exacly 6 spaces in front of 'Set')
- TWiki version:Beta 20011120
- Web server:Apache
- Server OS:SunOS
- Web browser:Netscape 4.77
- Client OS:Win NT 4
--
PetricFrank - 04 Dec 2001
Answer
TWiki has 3 level of preferences, Site (in
TWikiPreferences), web (in each
WebPreferences) and user (in each user home page). TWiki is not designed to expand variables defined in any page.
--
PeterThoeny - 05 Dec 2001
I really wish TWiki would expand variables defined in the current topic. I have some places where it would make things much easier. Is there some reason why expanding variables in the current topic is bad?
--
ChrisRiley - 18 Feb 2002
Luckily for you, this is already possible using
TopicVarsPlugin
One hint on variables - you can put the settings inside an HTML comment (i.e.
<!-- .... -->) to avoid them appearing in View mode.
--
RichardDonkin - 18 Feb 2002
Thanks! this was just what I needed.
ChrisRiley