• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.
It would be nice if we could define custom URL variables that will be passed on when we click on the 'edit' link. This can be used to set any URL variables that have an effect on how the edit page is rendered. An examples would be to set a custom skin or cover variable.

Another, more interesting example of this is the nowysiwyg variable, which determines whether we initially get the TinyMCE editor or the natedit editor. Combined with the code in Item5159 this gives the user full control over which editor to start with, while keeping the possibility to switch to the other editor during editing.

Changes in NatSkinPlugin.pm

Around line 888, change the code to include the string CUSTOM_EDITURLPARAMS...if defined.

$editUrlParams = '&action=form' unless $whiteBoard;
$editUrlParams = 
   . '%IF{"defined CUSTOM_EDITURLPARAMS" then="%CUSTOM_EDITURLPARAMS%" else=""}%';

Example configuration

Now we can use all the usual tools to define the value of CUSTOM_EDITURLPARAMS. For example, if i want to start the editor in plain text mode then i can use:

   * Set CUSTOM_EDITURLPARAMS = %IF{"defined NOWYSIWYG_DEFAULT" then="&nowysiwyg=%NOWYSIWYG_DEFAULT%&foobar=0" else="&foobar=1"}%
Summary Custom URL variables passed to edit link
ReportedBy TWiki:Main.MarkVanHeeswijk

SVN Range TWiki-4.3.0, Tue, 18 Dec 2007, build 16029
AppliesTo Extension
Component NatSkin
Priority Enhancement
CurrentState New


TargetRelease n/a

Topic revision: r1 - 2007-12-30 - MarkVanHeeswijk
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback