provide a collection of sub-parts of a page that may be placed separately on the page
This commit is contained in:
parent
cd65a3f7b5
commit
396d4727dc
2 changed files with 13 additions and 0 deletions
|
@ -192,6 +192,7 @@ class BaseView(GenericView, I18NView, SortableMixin):
|
||||||
actions = {}
|
actions = {}
|
||||||
portlet_actions = []
|
portlet_actions = []
|
||||||
parts = ()
|
parts = ()
|
||||||
|
subparts = ()
|
||||||
icon = None
|
icon = None
|
||||||
modeName = 'view'
|
modeName = 'view'
|
||||||
isToplevel = False
|
isToplevel = False
|
||||||
|
|
|
@ -98,6 +98,18 @@ class NodeView(BaseView):
|
||||||
def macro(self):
|
def macro(self):
|
||||||
return self.template.macros['content']
|
return self.template.macros['content']
|
||||||
|
|
||||||
|
@Lazy
|
||||||
|
def subparts(self):
|
||||||
|
def getParts(n):
|
||||||
|
t = n.targetObjectView
|
||||||
|
if t is None:
|
||||||
|
return []
|
||||||
|
return t.subparts
|
||||||
|
parts = getParts(self)
|
||||||
|
for n in self.textItems:
|
||||||
|
parts.extend(getParts(n))
|
||||||
|
return parts
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
result = super(NodeView, self).update()
|
result = super(NodeView, self).update()
|
||||||
self.recordAccess()
|
self.recordAccess()
|
||||||
|
|
Loading…
Add table
Reference in a new issue