According to
TWiki/TWikiTemplates#Finding_Templates:
Two preference variables can be used to override the templates used:
* =VIEW_TEMPLATE= sets the template to be used for viewing a topic
* =EDIT_TEMPLATE= sets the template for editing a topic.
If these preferences are set locally (using _Local_ instead of _Set_) for a topic, in WebPreferences, in [[%LOCALSITEPREFS%]], or [[%SYSTEMWEB%.TWikiPreferences]] (using _Set_), the indicated templates will be chosen for =view= and =edit= respectively. The template search order is as specified above.
However, although I have successfully used
Local in a 4.1.1 TWiki, my 4.1.2 TWiki seems to be requiring me to use
Set.
Given that I was also troubleshooting a different problem (described in Item5933), the fact that
Local wasn't working made the troubleshooting more frustrating.
--
TWiki:Main/VickiBrown - 17 Aug 2008
I have spent an hour trying to reproduce this and everything works as it should.
Are you sure you understand the concept of Local?
Local means the setting only applies to the topic in which it is used. So if you set the VIEW_TEMPLATE in a topic to change the view of that single topic - it makes no difference if you use Local or Set.
If you use Local in
WebPreferences then it means this view template applies to the
WebPreferences topic only.
If you use Set in
WebPreferences then it means the view template applies to all the topic in the web.
For the setting to also apply in Subwebs the template name path must be found also in the subweb. If you want to use ONE template for both web and subwebs simply use the full path for the template topic.
Example * Set VIEW_TEMPLATE = Myweb.MyviewTemplate
The two places where Local makes sense are in the user home topic where we use it today to make the form appear at the top. Using Set would change the VIEW_TEMPLATE for the user everywhere.
The other place are in preferences topics. Web and Twiki prefs. Here you can even use both in combination. Example (intentionally added one space too many to show the raw text)
* Set VIEW_TEMPLATE =
SpecialView
* Local VIEW_TEMPLATE =
PrefsView
Will set the VIEW_TEMPLATE for all topics in this web to
SpecialView except in this preferences topic where we use a
PrefsView template.
I cannot see any action on this one. It all works fine in 4.2.2. It could perhaps be an old bug in 4.1.2. I do not feel like spending another hour on an old version so I am not going to do that.
I set to no action. If the bug was in 4.1.2 and is now fixed then the right state should be Closed.
--
TWiki:Main.KennethLavrsen - 17 Aug 2008