diff --git a/gen/__init__.py b/gen/__init__.py
index 233d375..2236535 100644
--- a/gen/__init__.py
+++ b/gen/__init__.py
@@ -1671,7 +1671,8 @@ class Ref(Type):
specificWritePermission=False, width=None, height=5,
maxChars=None, colspan=1, master=None, masterValue=None,
focus=False, historized=False, mapping=None, label=None,
- queryable=False, queryFields=None, queryNbCols=1):
+ queryable=False, queryFields=None, queryNbCols=1,
+ navigable=False):
self.klass = klass
self.attribute = attribute
# May the user add new objects through this ref ?
@@ -1737,6 +1738,8 @@ class Ref(Type):
self.queryFields = queryFields
# The search screen will have this number of columns
self.queryNbCols = queryNbCols
+ # Within the portlet, will referred elements appear ?
+ self.navigable = navigable
Type.__init__(self, validator, multiplicity, index, default, optional,
editDefault, show, page, group, layouts, move, indexed,
False, specificReadPermission, specificWritePermission,
diff --git a/gen/mixins/__init__.py b/gen/mixins/__init__.py
index 04d63b6..51594df 100644
--- a/gen/mixins/__init__.py
+++ b/gen/mixins/__init__.py
@@ -737,6 +737,8 @@ class BaseMixin:
else:
phase = phases[typePhase]
phase.addPage(appyType, self, layoutType)
+ if (appyType.type == 'Ref') and appyType.navigable:
+ phase.addPageLinks(appyType, self)
# Remove phases that have no visible page
for i in range(len(res)-1, -1, -1):
if not res[i]['pages']:
diff --git a/gen/model.py b/gen/model.py
index 0ac4c3b..d3d45ea 100644
--- a/gen/model.py
+++ b/gen/model.py
@@ -199,7 +199,7 @@ class Page(ModelClass):
def showSubPages(self): pass
pages = gen.Ref(None, multiplicity=(0,None), add=True, link=False,
back=gen.Ref(attribute='parent', show=False),
- show=showSubPages)
+ show=showSubPages, navigable=True)
Page.pages.klass = Page
setattr(Page, Page.pages.back.attribute, Page.pages.back)
diff --git a/gen/ui/portlet.pt b/gen/ui/portlet.pt
index a714e97..dfa2563 100644
--- a/gen/ui/portlet.pt
+++ b/gen/ui/portlet.pt
@@ -18,7 +18,7 @@
-
+ One section for every searchable root class.
@@ -99,58 +99,48 @@
This macro displays, within the portlet, the navigation tree for the
currently shown object, made of phases and contained pages.
-
-
+ tal:condition="python: phases" width="100%">
The box containing phase-related information