Tags:
create new tag
, view all tags

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

TWiki version: TWikiRelease04x01x02
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Ubuntu 7.10
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories:  

-- JinalSurti - 03 Dec 2008

Answer

ALERT! 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

 
Change status to:
Topic revision: r4 - 2009-02-15 - PeterThoeny
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.