Tags:
create new tag
view all tags

SID-00159: Simultaneous generation of 2 pages

Status: Answered Answered TWiki version: 4.2.4 Perl version: 5.10
Category: CategoryTemplates Server OS: Win Server 2003 Last update: 17 years ago

I need to allow some users to have full right on the page and others just commenting rights. I am trying to do the following. -Having a general web and 2 other subwebs: Content and Discussion. -Content and Discussion webs are going to be populated with pages which are based on templates only - Provide in the General web a form input with a create button where the user would input smth like NewContent. The button would call two actions: one which will create NewContent (loading the specific template from that subweb) and NewContent (loading the subweb's template)

My question is how can I actually make two actions, for loading in a page two different templates since there is just one parameter templateTopic available for save script.

I would really need some help with this frown Thank you in advance!

-- RoxanaCraciun - 04 Mar 2009

Discussion and Answer

Look into TopicCreatePlugin.

Look also into conditionally show an edit link or view link based on topic exist. If topic does not exist, point it to the edit script with a specific template. Untested:

%IF{ "istopic 'Otherweb.%TOPIC%Discussion'"
  then="[[Otherweb.%TOPIC%Discussion][Discussions]]"
  else="[[%SCRIPTURL{edit}%/Otherweb/%TOPIC%Discussion?topictemplate=Otherweb.DiscussionTemplate][Create discussion page]]"
}%

A custom CommentPlugin template might come in handly, as we have here in the support forum.

-- PeterThoeny - 04 Mar 2009

I managed to make it work partially. Now I have some issues which are concerned with usability.

After I create the comments and include the comment page into the topic page, every time I add a comment I have to migrate to the discussion page of the topic and I don't like that. Do you have any idea how to change that?

-- RoxanaCraciun - 12 Mar 2009

The save script understands a redirectto parameter. See details at CommentPlugins and TWikiScripts.

-- PeterThoeny - 12 Mar 2009

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
SupportForm
Status Answered
Title Simultaneous generation of 2 pages
SupportCategory CategoryTemplates
TWiki version 4.2.4
Server OS Win Server 2003
Web server Apache 2.2.10
Perl version 5.10
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2009-03-12 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.