create new tag
, view all tags

Feature Proposals » Excluding specified topics when creating a new web


Current State: Developer: Reason: Date: Concerns By: Bug Tracking: Proposed For:
MergedToCore HideyoImazu AcceptedByReleaseMeeting 2017-05-31   TWikibug:Item7816 KampalaRelease

Edit Form

DateOfCommitment:   Format: YYYY-MM-DD


A TWiki application has its data as topics. When you create a new instance of an app by cloning a web, you may want to exclude data topics. Once an application is established, you can create a template web having only scaffolding without data, with which you can create a new instance of the app by using the template web without hassle. But a web app may evolve incrementally. In that case, it's handy to clone a TWiki app excluding data topics.

Description and Documentation

Let's introduce excludetopic parameter to the createweb action of the manage script. The excludetopic parameter will work just like the same parameter of SEARCH{}.

Let's assume data topics are named AppPrefixAUTOINC0. In that case, AppPrefixTemplate and AppPrefixForm topics are likely there. If so, AppPrefeixTemplate and AppPrefixForm need to be made exception of the exclusion. Besides, WebPreferences must exist for a web to be recognized by TWiki. To avoid some topics to be excluded, the excludeexception parameter will be used, whose default value will be specified by %CREATE_WEB_EXCLUDE_EXCEPTION%. The excludeexception parameter's value will be in the same format as excludetopic. As such, TWiki.TWikiPreferences will have:

   * Set CREATE_WEB_EXCLUDE_EXCEPTION = *Template, *Form, WebPreferences

The following row will be added to the new web creation form on ManagingWebs.

Exclude Topic:
Enter comma separated list of topics to exclude from the template web. For example, Data* excludes all topics whose name starts with Data.

e.g. if *Form is specified as exception, DataForm is copied even if Data* is specified to be excluded.




WhatDoesItAffect: Usability


-- Contributors: Hideyo Imazu - 2017-05-31


In the sense of being easy-to-understand and (rather) easy-to-implement, this is a good solution for the problem. In TWiki applications, data topics are usually created with the AUTOINC mechanism, so I'd expect that one needs very few, in most cases just one, AppPrefix* entry to exclude all data topics from being copied over. Two minor caveats: Care must be taken by the creator of the new web that the EXCLUDE entries don't per accident exclude topics like AppPrefixForm and AppPrefixTemplate which are needed to run the application, and by the programmer that "mandatory" topics (in particular WebPreferences) are not excluded.

-- Harald Jörg - 2017-06-02

Thank you for pointing out about *Form, *Template, and WebPreferences. I modified the proposal accordingly.

-- Hideyo Imazu - 2017-06-05

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2017-07-05 - 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-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.