Question
I would like to be able to define TWiki preferences with parameters (macros). For example, defining:
%HEAD{chapter 1}%
to render as:
<B><I>chapter 1</I></B>
Where chapter 1 can be any text
As far as I can tell there is no 'easy' way to accomplish this in TWiki. Is this correct?
If so, I will have to implement my own macros in twiki's sourcecode. This shouldn't be too much of a problem; I am familier with Perl. Can anybody give some pointers as to where in the source it is best to implement this. Which file, and which function?
Environment
--
TWikiGuest - 05 Jun 2007
Answer
If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.
Preferences do not support parameters at this time. However, you can use parameterized include. This is not well documented, but see
VarINCLUDE and
IncludedTopicUsedAsMacro.
--
PeterThoeny - 06 Jun 2007
See sample at
SnazzyRoundedCornersContrib.
--
PeterThoeny - 06 Jun 2007
Thank you for your answer. After looking at how to write plugins, and thinking about it a little I decided to write a plugin which contains some shortcuts.
--
TWikiGuest - 08 Jun 2007