%TOPICCREATE{}% TWikiVariable is useful for creating topics based on templates
%TOPICCREATE{ <attributes> }%
|
|||||||||||||||||||||
Save Changes button in preview
%TOPICCREATE{}% variable will be removed upon saving of the topic
template will also be copied to the new topic
%TOPICCREATE% is recursive
%TOPICCREATE{ template="MyTemplate" topic="%TOPIC%MyNewTopicName" parameters="MyParameterName=MyParameterValue&Hello=Goodbye" }% to create a twiki topic based on another topic MyTemplate with the name %TOPIC%MyNewTopicName. Any %URLPARAM{}% with the name MyParameterName and Hello present in MyTemplate will be replaced with MyParameterValue and Goodbye.
disable argument, or escape it: %TOPICCRE%NOP%ATE{...}%. The %NOP% gets removed when a topic gets instantiated based on a template.
%TOPICATTACH{ <attributes> }%
|
|||||||||||||||||||||
%TOPICATTACH{ fromtopic="SourceTopic" fromfile="Sample.jpg" name="Snoopy.jpg" disable="..."}% to attach Sample.jpg from topic SourceTopic as Snoopy.jpg
fromtopic if desired
fromtopic can specify a different web if desired. For example TWiki.SomeTemplate would be valid as a fromtopic
disable parameter with the topic name containing the %TOPICATTACH%.
name argument to rename the topic as it is copied
TOPICATTACH must be in the 'top level' topic being saved by a TOPICCREATE. It can not be in a recursive/subordinate topic invoked by the TOPICCREATE.
%<plugin>_<setting>%, i.e. %TOPICCREATEPLUGIN_SHORTDESCRIPTION%
data/debug.txt) cp and mkdir.
TopicCreatePlugin.zip in your twiki installation directory. Content:
|
|||||||||||
Sandbox.CreateClientNotebook
MyTest MyTestEnvironment and MyTestTripLog
CreateClientNotebook topic to the created trip log
TestTopicCreate with this content: %TOPICCREATE{ template="TWiki04x02.WikiWord" topic="%TOPIC%Child" }%
TestTopicCreate you should get a new topic TestTopicCreateChild with the content of WikiWord.
|
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||