create new tag
, view all tags
AndreUlrich suggested:

Maybe it is possible to define some kind of target topic , so you don't even see the created topic. For example by adding a new article in a Discussion-Forum you would be directed to the overview instead of the created topic.

and I think this may be generalisable because the TWiki::redirect call has the cgi-query as a param.

so If we add a new Url parameter gotoTopic, that is exaluated within the redirect function, then it would be possible for the user to do any function, and then on success, show some other topic. - the simple to explain example is from SaveContentWithoutEdit, where I want to click the button that creates teh new topic, but then either stay on this topic (the user does not even need to know that they are creating a topic) - and so they are ready do make another.

-- SvenDowideit - 03 May 2004

Useful. So far TWiki uses only lowercase parameter names. I suggest to name the parameter simply redirect and to pass it through from edit to preview to save. On error, the error message should be displayed as usual, but the redirect parameter would redefine the [OK] link of the error message.

-- PeterThoeny - 07 May 2004

Refactored out discussion about redirect on topic view to RedirectPlugin

-- SamHasler - 27 Aug 2004

and the code for it is:

Index: lib/TWiki/UI/Save.pm
RCS file: /cvsroot/twiki/twiki/lib/TWiki/UI/Save.pm,v
retrieving revision 1.4
diff -r1.4 Save.pm
>   my $gototopic = $query->param( "gototopic" ) || $topic;
> TWiki::writeDebug("Save.pm saveerr ($error)");
<       TWiki::redirect( $query, TWiki::getViewUrl( TWiki::Store::normalizeWebTopicName($webName, $topic)) );
> #SVEN - implement ?gototopic=web.topic
>       TWiki::redirect( $query, TWiki::getViewUrl( TWiki::Store::normalizeWebTopicName($webName, $gototopic)) );
> #     TWiki::redirect( $query, TWiki::getViewUrl( TWiki::Store::normalizeWebTopicName($webName, $topic)) );

and add the entry to your template

<input type="hidden" name="gototopic" value="%URLPARAM{"gototopic"}%" /><input type="submit" value=" &nbsp; Save Changes &nbsp; " />

I am using it at work as a quickedit link from the MyTaskList Topic, thus allowing users to quickly update their tasks, and then return to the query topic rather than the view topic smile

-- SvenDowideit - 17 Jun 2004

Edit | Attach | Watch | Print version | History: r12 < r11 < r10 < r9 < r8 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r12 - 2005-02-16 - CrawfordCurrie
  • 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-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.