Feature Proposal: Adjust the search order for WebTopicEditTemplate to also include the USERSWEB
Motivation
My
%SYSTEMWEB% is read-only mounted thanks to
MultipleSitesSameCodebase, which means that it can't be changed via web browser & is applicable for ALL
TWikiSites that run from the same codebase.
I'm motivated to be able customize the
WebTopicEditTemplate once per
TWikiSite (in the
%USERSWEB%) instead of being forced to customize in either
every web or once for
all sites.
Description and Documentation
TWikiTemplates says that when you create a new topic, TWiki locates a topic to use as a content template according to the following search order:
- A topic name specified by the templatetopic CGI parameter
- if no web is specified, the current web is searched first and then the TWiki web
- WebTopicEditTemplate in the current web
- WebTopicEditTemplate in the
%SYSTEMWEB% web
My proposal is to update this search order as follows :
- A topic name specified by the templatetopic CGI parameter
- if no web is specified, the current web is searched first and then the TWiki04x01 web
- WebTopicEditTemplate in the current web
- WebTopicEditTemplate in the
%USERSWEB% web
- WebTopicEditTemplate in the
%SYSTEMWEB% web
Examples
Impact
Implementation
--
Contributors: KeithHelfrich,
PeterThoeny - 2010-06-22
Discussion
This is the logical next step to make the TWiki web read-only. I am wondering if there is a need for a WebTopicEditTemplate in the Main web as you describe
and for a separate WebTopicEditTemplate that overrides the system level template for the Main web. My
guess is no, but...
--
PeterThoeny - 28 Jul 2007
Just because I can't imagine the reason doesn't mean that the reason doesn't exist
!! So it's probably best to allow
WebTopicEditTemplate to follow the same logical hierarchy that is followed by
TWikiVariables ... and this would mean that the search order is filled as follows :
- A topic name specified by the templatetopic CGI parameter
- if no web is specified, the current web is searched first and then the
%TWIKIWEB% web
- WebTopicEditTemplate in the current web
- WebTopicEditTemplate in the
%MAINWEB% web
- WebTopicEditTemplate in the
%TWIKIWEB% web
--
KeithHelfrich - 31 Jul 2007
This is a sensible enhancement. No need for search path, simply adding the Main web's template in between site and web level is sufficient.
I put myself down as committed developer.
--
PeterThoeny - 2010-06-22
This is now
AcceptedBy7DayFeedbackPeriod.
--
PeterThoeny - 2010-06-30
Code now in
SVN trunk. Docs pending.
--
PeterThoeny - 2010-07-02
Docs partially done.
--
PeterThoeny - 2010-07-04
Docs are finished as well.
--
PeterThoeny - 2010-07-06