create new tag
, view all tags

Feature Proposal: Importing web level preferences from specified topics


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.


   * Set EXTRAPREFERENCES = Apps/BulletinBoardImpl.VarDefs



-- Contributors: HideyoImazu - 2012-11-06


(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.

  1. Using variable setting import, individual user interface topics don't have to "include" variable setting.
  2. %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

Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r9 - 2013-02-18 - 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.