Question
Hi, I've been trying to create new pages through a template using the '?' shortcut that appears beside potential
TopicNames on an existing page. I can create new pages through the template using "Create New Topic" on the left bar, but I want users to just click on a '?' (only beside a few particular topic names) and be able to use a specific template to create that topic. I am using TWiki version 4.1.2
Environment
--
JinalSurti - 03 Dec 2008
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.
Create a WebTopicEditTemplate page in your web. Read details in
TWikiTemplates#Template_Topics.
--
PeterThoeny - 04 Dec 2008
Creating the
WebTopicEditTemplate will create the template and use it as a default for EVERY new page, right? What I need is for the template to be automatically used for specific new topics, not all. Mayeb there is a plugin that lets me select a template once I am in the edit page?
--
JinalSurti - 04 Dec 2008
I was thinking the new topic creation '?' can be used to specify the template to use for the new topic using something like this:
[[%FORMFIELD{BaseWikiName}%Reference?template=ContractReferenceTemplate][User's Reference Manual]]
--
JinalSurti - 04 Dec 2008
You would need to create a specific link to the
edit script, such as:
[[%SCRIPTURL{edit}%/WEB%/%FORMFIELD{BaseWikiName}%Reference?templatetopic=ContractReferenceTemplate][User's Reference Manual]]
You could make the link conditional, to create above link to the
edit script if the topic does not exist, else create a link to the topic. More at
VarIF,
IfStatements,
TWikiScripts.
--
PeterThoeny - 15 Feb 2009