extend HTML head title; make retrieving of type concept independent of current container
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3296 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
4a65b2d87a
commit
b9fa00b1e7
2 changed files with 7 additions and 4 deletions
|
@ -267,7 +267,7 @@ class TypeInstances(object):
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def typeConcept(self):
|
def typeConcept(self):
|
||||||
return self.context[self.typeName]
|
return self.context.getLoopsRoot().getConceptManager()[self.typeName]
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def typeToken(self):
|
def typeToken(self):
|
||||||
|
|
|
@ -24,6 +24,7 @@ $Id$
|
||||||
|
|
||||||
from zope.app.security.interfaces import IUnauthenticatedPrincipal
|
from zope.app.security.interfaces import IUnauthenticatedPrincipal
|
||||||
from zope.cachedescriptors.property import Lazy
|
from zope.cachedescriptors.property import Lazy
|
||||||
|
from zope import component
|
||||||
|
|
||||||
from cybertools.composer.layout.browser.view import Page
|
from cybertools.composer.layout.browser.view import Page
|
||||||
from loops.common import adapted
|
from loops.common import adapted
|
||||||
|
@ -34,7 +35,7 @@ class LayoutNodeView(Page):
|
||||||
@Lazy
|
@Lazy
|
||||||
def loopsRoot(self):
|
def loopsRoot(self):
|
||||||
return self.context.getLoopsRoot()
|
return self.context.getLoopsRoot()
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def defaultPredicate(self):
|
def defaultPredicate(self):
|
||||||
return self.loopsRoot.getConceptManager().getDefaultPredicate()
|
return self.loopsRoot.getConceptManager().getDefaultPredicate()
|
||||||
|
@ -75,8 +76,10 @@ class LayoutNodeView(Page):
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def headTitle(self):
|
def headTitle(self):
|
||||||
if self.target:
|
if self.target is not None:
|
||||||
return ' - '.join((self.context.title, self.target.title))
|
targetView = component.getMultiAdapter((self.target, self.request),
|
||||||
|
name='layout')
|
||||||
|
return ' - '.join((self.context.title, targetView.title))
|
||||||
else:
|
else:
|
||||||
return self.context.title
|
return self.context.title
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue