%TEXT%
, which is expanded to the raw text of the page
%SET{"VARIABLE" value="VALUE"}%
and %CALCULATE{"$SET(VARIABLE, VALUE)"}%
in an INCLUDE'd topic take effect since %INCLUDE{...}%
, %SET{...}%
, and %CALCULATE{...}%
are variables expanded in a later stage.
But " * Set VARIABLE = VALUE"
in an INCLUDE'd topic doesn't have a chance to be read.
%TMPL:XXX{...}%
or %TMPL:XXX%
.
%SET{"foo" value="abc"}% %GET{"foo"}% %SET{"foo" value="def"}% %GET{"foo"}%Result:
abc def
%CALCULATE{...}%
and %GET{...}%
.
Those don't make structural difference to how a TWiki topic is written.
Those variables are introduced by calling e.g. TWiki::Func::registerTagHandler('CALCULATE', \&_CALCULATE)
in initPlugin()
in the plugin code file.
Some plugins extend TWiki markup.
For example, the table notation in TWiki (an example shown below) is provided by the TablePlugin. Though the table notation is regarded as an integral part of TWiki markup, it is implemented by a plugin rather than the TWiki core.
| One One | One Two | One Three | | ^ | Two Two | Two Three | | Three One | ^ | Three Three |There are various places in the TWiki core where functions provided by plugins are called. For example, TablePlugin has a function named
preRenderingHandler()
defined.
It's called before the TWiki markup to HTML conversion takes place.
As you can imagine, if a plugin has postRenderingHandler()
defined, it's called after the core TWiki markup to HTML processing.
A plugin may have commonTagsHandler()
defined, which is called immediately after normal TWiki variables are expanded.
Since a commonTagsHandler()
may yield TWiki variables, normal TWiki variable expansion is conducted again after that.
SpreadSheetPlugin has commonTagsHandler()
defined to process %CALC{...}%
. You may think %CALC{...}%
can be implemented simply by TWiki::Func::registerTagHandler()
but it cannot be since %CALC{...}%
needs to look outside its parameters to do things such as %CALC{"$SUM($ABOVE())"}%
.
In addition to preRenderingHandler()
, postRenderingHandler()
, and commonTagsHandler()
, there are other functions called from TWiki core as well.
You can see the complete list of such functions on EmptyPlugin.pm in the EmptyPlugin.
Related Topics: DeveloperDocumentationCategory, TWikiTemplates, TWikiVariables, TextFormattingRules Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
Microchip and others, are registered trademarks or trademarks of Microchip Technology Inc. and its subsidiaries.
Arm® and others are registered trademarks or trademarks of Arm Limited (or its affiliates). Other terms and product names may be trademarks of others.
Ideas, requests, contributions ? Connect to LinksToCommunities page.