• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item5933: VIEW_TEMPLATE Override Ignored for Subwebs

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal Closed TWiki:Main/VickiBrown n/a 4.2.2

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

Setting VIEW_TEMPLATE works for webs, not for subwebs.

I have used the VIEW_TEMPLATE setting to override the View template successfully in several cases, so I was very surprised when this was completely ignored for one of my webs.

After giving the matter more thought, I realized there was one difference - this was a subweb.

When I promoted the web to a top-level web, without changing the WebPreferences setting, the View override worked.

(c.f. TWiki/TWikiTemplates)

-- TWiki:Main/VickiBrown - 17 Aug 2008

What was the setting of your VIEW_TEMPLATE variable using the subweb? I am using VIEW_TEMPLATES extensively pointing to apps in subwebs and this works fine so far.

-- TWiki:Main.MichaelDaum - 17 Aug 2008

I have tested this for an hour together with the Item5934 and it all works as specified in 4.2.2

I tested with view templates both in a web and in a subweb. I tested with the template file specific for the subweb and with a template file in the parent web.

And it all works great. One thing to note.

If you specify the template in WebPreferences of the parent web, and you want this to apply to the subweb then the variable must be valid seen in the context of being in the subweb.

Example in the parent web "Myweb" WebPreferences we have * Set VIEW_TEMPLATE Myview, and the MyviewTemplate is created only in the Myview web. In a subweb Myweb/Mysub the VIEW_TEMPLATE setting will fail to find the template because it seens the setting in context of the current web (which is quite logical).

Changing the Myweb/WebPreferences to "* Set VIEW_TEMPLATE = Mysub.Myview" makes the view template work both in the parent and the subweb because now the subweb context sees the setting with the full path.

I cannot see any action here but will wait for Vicki to provide feedback.

-- TWiki:Main.KennethLavrsen - 17 Aug 2008

MIchael -

   * Set VIEW_TEMPLATE = MyWeb.MyViewTemplate

Kenneth - good to know that this is not a bug in 4.2.2.

I like the "Set VIEW_TEMPLATE in parent and it inherits to subweb." That does work here (in 4.1.2). IIt was the "Set VIEW_TEMPLATE for subweb only" that is failing.

I guess I need to upgrade :)

-- TWiki:Main.VickiBrown - 17 Aug 2008

I just double checked. Setting a VIEW_TEMPLATE in the WebPreferences of a subweb and having a template topic in this subweb also works without having to use the full path in the preference.

-- TWiki:Main.KennethLavrsen - 17 Aug 2008

ItemTemplate
Summary VIEW_TEMPLATE Override Ignored for Subwebs
ReportedBy TWiki:Main.VickiBrown
Codebase 4.1.2
SVN Range TWiki-5.0.0, Mon, 11 Aug 2008, build 17408
AppliesTo Engine
Component

Priority Normal
CurrentState Closed
WaitingFor TWiki:Main/VickiBrown
Checkins

TargetRelease n/a
ReleasedIn 4.2.2
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2008-08-17 - KennethLavrsen
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback