Tags:
create new tag
, view all tags

Passthrough of the TemplateTopic

Short of having TopicNameDrivenNewEditTemplate, I was trying to make it so that clicking on a reference to a non-existant appraisal topic on the Plugins.WebLeftBar would create the topic with the specified templatetopic.

However, it fails, because VIEWURL/.../?templatetopic=PluginAppraisalTemplate does not pass through the templatetopic parameter.

Is there another way to do acheive this in todays implementation?

-- MartinCleaver - 04 Nov 2004

I guess you could write some Javascript, but otherwise, I can't think of a way. Have you submitted a ChangeProposal? Or better, a patch against DEVELOP (or even a checked-in fix).

-- CrawfordCurrie - 05 Nov 2004

Has any updates been done to this? I am integrating nagios and twiki and use urls like:

/twiki/bin/view/Main/NagSvcPingCheck?templatetopic="NagSvcNewTemplate"&host=ahostname&service=PingCheck&state=&output=

I would like the "Create the new page" link to pass all the query parameters. This allows the template to use URLPARAM to customize the edited text.

-- JohnRouillard - 02 Dec 2005

An alternative is to use the TopicCreatePlugin to create the *Dev and *Appraisal topic at the time you create the Plugin topic.

-- PeterThoeny - 04 Dec 2005

Fixed it well enough for my purpose. Edited WebTopicViewTemplate and changed:

---+++ If you would like to create this page:

   * Continue to <a href="%SCRIPTURLPATH%/edit%SCRIPTSUFFIX%/%WEB%/%TOPIC%"><b>Create the new page</b></a>

to read:

---+++ If you would like to create this page:

   * Continue to <a href="%SCRIPTURLPATH%/edit%SCRIPTSUFFIX%/%WEB%/%TOPIC%?templatetopic=%URLPARAM{"templatetopic" default =""}%"><b>Create the new page</b></a>
A non existent value to templatetopic uses the default template (WIKINAME - DATE) for the web page.

-- JohnRouillard - 26 Jan 2006

1) congrats you got it to work! 2) shame we only have a convoluted solution!!

I wonder whether what's inhibiting this from working in an intuitive way can be found.

-- MartinCleaver - 26 Jan 2006

I made a similar change before finding this topic. In WebTopicCreator, I include:

<input type="hidden" name="templatetopic" value="%URLPARAM{"templatetopic"}%">

-- ByronIgoe - 25 Jul 2007

 
Topic revision: r7 - 2007-07-25 - ByronIgoe
 
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.