use target view (set via node traverser) only if requested as default (index.html) view

This commit is contained in:
Helmut Merz 2012-01-29 11:25:26 +01:00
parent 2a7a5f8a1d
commit 46c0e997d4

View file

@ -429,9 +429,10 @@ class NodeView(BaseView):
return None return None
def targetView(self, name='index.html', methodName='show'): def targetView(self, name='index.html', methodName='show'):
tv = self.viewAnnotations.get('targetView') if name == 'index.html': # only when called for default view
if tv is not None: tv = self.viewAnnotations.get('targetView')
return tv() if tv is not None:
return tv()
if '?' in name: if '?' in name:
name, params = name.split('?', 1) name, params = name.split('?', 1)
target = self.virtualTargetObject target = self.virtualTargetObject