Question
Hello!
I want to read in a Template via
readTemplate (
TWikiFuncModule in a Plugin. The Template contains only two variable definitions, a table header and a sample table row (since I want to keep design and language stuff out of the code).
How can I access my two variables?
The Documentation (
TWikiTemplates) says: Variables live in a global name space: there is no parameter passing. But I've no idea, how to access them (variable name, key).
Does anybody know?
Of course I can put it back into the Plugin, or write some kind of workaround using one of the other
TWiki::Func::read* functions, but I think a template would suite best.
Or am I wrong?
Thank you!
Susanne
Environment
--
SusanneRuppel - 28 May 2005
Answer
I think I found the recommended way:
TWikiPlugins.
--
SusanneRuppel - 28 May 2005
If you just want to store variables persistently it is easier to define Plugin variables in your Plugin topic, e.g.
- Set SAMPLE_HEADER = |*Foo*|*Bar*|
You can access that in any topic and in any template as
%MYOWNPLUGIN_SAMPLE_HEADER%
--
PeterThoeny - 29 May 2005
I had to fill out the variables in a kind of template with dynamic content (like the TWiki engine does), so the Plugin settings didn't help (but I have a bunch of them :-). The
TWikiPlugins way worked very fine for me.
Thank you!
--
SusanneRuppel - 07 Jun 2005