Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Added: | ||||||||
> > |
INCLUDE a topic in the raw
When a topic is included, normally TWiki variables in the included topic are expanded in the context of the inlcluded topic. But if This topic explains what it is for and what it really means.
When a new topic is created based on a template topic
You can specify a template topic when you create a new topic.
Variable expansion during topic creation is different from usual.
It's explained here.
Basically, variables are not expanded for the most part but you can force variable expansion by prepending
Leveraging %EOTC__INCLUDE{"TmplPartA" raw="on"}% %EOTC__INCLUDE{"TmplPartB" raw="on"}%Thanks to raw="on" , TWiki variables in TmplPartA and TmplPartB are not expanded when those topics are included.
Since most variables are not expanded in topic creation, most variables in TmplPartA and TmplPartB are put as they are in the new topic.
Let's assume TmplPartA contains
If
When a topic is viewedIn viewing a topic, variable expansion always happen.
Let's say there is a topic named IncludedTopic whose content is
IncludedTopic:
If that's included by another topic IncludingTopic with
IncludingTopic:
This is because when IncludedTopic is included by IncludingTopic, the variable
On the other hand, if you don't have
IncludingTopic:
Related Topics: VarINCLUDE, TWikiTemplates#Variable_Expansion |