create new tag
, view all tags

Feature Proposals » Setting redirectto by preference variable


Current State: Developer: Reason: Date: Concerns By: Bug Tracking: Proposed For:
AcceptedProposal MahiroAndo AcceptedBy14DayRule 2016-06-22   TWikibug:Item7749 KampalaRelease

Edit Form

DateOfCommitment:   Format: YYYY-MM-DD


I'd like to set "?redirectto=..." parameter to the edit link for all the topics in the entire web. In order to do that, it would be handy to use a preference variable such as "Set SAVEREDIRECTTO = ..." in the WebPreference page. This will help me implement an automatic JavaScript -based push to a separate social system, with which people can keep track of news that someone edits topics in the TWiki web.

As a minor additional enhancement, I'd also like to allow the after-redirect page to detect whether the action was a quiet save or not. For that, I'm considering to make a variable like "$dontnotify" available in the redirectto parameter value, which will respect whether the action was a normal save or a quiet save.

When making "$dontnotify" available, the feature can be a little more generic by making all the formdata parameters for the save script available as variables in the redirectto value. It is slightly concerning because the "dontnotify" parameter is implicitly set within the save script handler (probably because of backward compatibility?) rather than the value is passed via the formdata submitted to the save script.

Description and Documentation

  1. If SAVEREDIRECTTO pref var is set, the "redirectto" URL param is added to the edit link at the top of the view page.
  2. If $variables are contained in the "redirectto" parameter value, the variables are expanded based on the formdata submitted to the save script. The "dontnotify" parameter is a special case, where the value is set to "checked" if the action is a quiet save.


    * Set SAVEREDIRECTTO = ExampleRedirectHandler?savedTopic=%TOPIC%;dontnotify=$dontnotify


WhatDoesItAffect: Prefs, Rendering, UI


-- Contributors: Mahiro Ando - 2016-06-22


Proposal looks good.

-- Peter Thoeny - 2016-06-23

The proposal looks fine. The only thing I'd suggest is a name for the preference variable which makes clear that the redirection takes place only after a save action. Something like SAVEREDIRECTTO.

-- Harald Jörg - 2016-06-24

Good idea Harald.

-- Peter Thoeny - 2016-06-24

Thanks for the suggestion. I agree - bare REDIRECTTO within WebPreferences could sound ambiguous. I've updated the description with SAVEREDIRECTTO.

-- Mahiro Ando - 2016-07-04

Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2016-08-09 - HideyoImazu
  • 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.