Feature Proposal: Importing web level preferences from specified topics
Motivation
For
TWiki applications and managing multiple top level webs consistently, it's handy to be able to import web-wide preferences from a specified topic.
Description and Documentation
This enhancement affects preferences reading. Specifically, after reading WebPreferences of the current web and before reading the topic preferences,
EXTRAPREFERENCES variable is checked. It can have comma separated list of
WEB.TOPIC. Those topics are read as if they were WebPreferences topics.
Examples
* Set EXTRAPREFERENCES = Apps/BulletinBoardImpl.VarDefs
Impact
Implementation
--
Contributors: HideyoImazu - 2012-11-06
Discussion
(Originally posted in
TWikiAppUsingVarImportAndFormMapping:)
This could be useful as noted. I think for TWiki apps it not needed as long as you use
SetGetPlugin variables instead of preferences settings. You can INCLUDE SetGetPlugin variables in your app pages. They are as flexible as preferences settings, and they can be used in many places with INCLUDEs, e.g. you don't run into the preferences path issue.
If you follow-up on preferences settings path: Make sure the FINALPREFERENCES are final.
--
PeterThoeny - 2012-11-05
It's true that if you use
SetGetPlugin, you don't have to extend TWiki to make it possible to import variable settings from a topic.
Still, there are practical merits in variable setting import especially with an application occupying an entire subweb and having multiple user interface topics.
- Using variable setting import, individual user interface topics don't have to "include" variable setting.
-
%VARIABLE% is less cluttered than %GET{VARIABLE}%. Besides, %INCLUDE{%APPWEB%.BulletingBoardSettings}% needs to be put inside an HTML comment at the top of a topic, which makes things less beautiful.
--
HideyoImazu - 2012-11-06
I think this feature brings up the question of balance between added functionality and complexity. I am a bit at unease with this feature, questioning if the added complexity warrants the functionality gained.
Having said that, I will support this feature as long as performance is not affected when the feature is not used.
--
PeterThoeny - 2012-11-07
One clear advantage of variable setting import over
SetGetPlugin for TWiki applications is a TWiki variable can take parameters while values SET'ed and GET'ed cannot.
(I mentioned this on
TWikiAppUsingVarImportAndFormMapping, too)
I believe added complexity and performance hit are minimal. If this feature is implemented but you don't use it, the additional cost is to check
WEB_EXTRA_PREFS_TOPICS.
To process a subweb, TWiki reads WebPreferences of its ancestors.
So this feature is not so much a stretch.
--
HideyoImazu - 2012-11-07
Accepted by release meeting at
JerusalemReleaseMeeting2012x11x09, using name EXTRAPREFERENCES.
--
PeterThoeny - 2012-11-09
The example wasn't using the agreed-upon name. Now it is.
--
HideyoImazu - 2012-12-26