page structure via standard parts working
This commit is contained in:
parent
6707ab59ff
commit
460520be20
3 changed files with 57 additions and 3 deletions
|
@ -39,8 +39,8 @@ book_template = ViewPageTemplateFile('view_macros.pt')
|
|||
class PageLayout(standard.Layout):
|
||||
|
||||
def getParts(self):
|
||||
parts = ['headline', 'keyquestions', 'maintext',
|
||||
'story', 'usecase', 'quote']
|
||||
parts = ['headline', 'keyquestions', 'quote', 'maintext',
|
||||
'story', 'usecase']
|
||||
return self.getPartViews(parts)
|
||||
|
||||
|
||||
|
@ -69,3 +69,24 @@ class Headline(PagePart, standard.Header2):
|
|||
class MainText(PagePart, standard.BasePart):
|
||||
|
||||
partName = 'maintext'
|
||||
|
||||
|
||||
class KeyQuestions(PagePart, standard.BasePart):
|
||||
|
||||
partName = 'keyquestions'
|
||||
|
||||
|
||||
class Story(PagePart, standard.BasePart):
|
||||
|
||||
partName = 'story'
|
||||
|
||||
|
||||
class UseCase(PagePart, standard.BasePart):
|
||||
|
||||
partName = 'usecase'
|
||||
|
||||
|
||||
class Quote(PagePart, standard.BasePart):
|
||||
|
||||
partName = 'quote'
|
||||
gridPattern = ['span-2 last']
|
||||
|
|
|
@ -35,6 +35,14 @@
|
|||
factory="loops.compound.book.browser.Headline"
|
||||
permission="zope.View" />
|
||||
|
||||
<zope:adapter
|
||||
name="lobo_keyquestions"
|
||||
for="loops.compound.book.interfaces.IPage
|
||||
loops.browser.skin.Lobo"
|
||||
provides="zope.interface.Interface"
|
||||
factory="loops.compound.book.browser.KeyQuestions"
|
||||
permission="zope.View" />
|
||||
|
||||
<zope:adapter
|
||||
name="lobo_maintext"
|
||||
for="loops.compound.book.interfaces.IPage
|
||||
|
@ -43,4 +51,28 @@
|
|||
factory="loops.compound.book.browser.MainText"
|
||||
permission="zope.View" />
|
||||
|
||||
<zope:adapter
|
||||
name="lobo_story"
|
||||
for="loops.compound.book.interfaces.IPage
|
||||
loops.browser.skin.Lobo"
|
||||
provides="zope.interface.Interface"
|
||||
factory="loops.compound.book.browser.Story"
|
||||
permission="zope.View" />
|
||||
|
||||
<zope:adapter
|
||||
name="lobo_usecase"
|
||||
for="loops.compound.book.interfaces.IPage
|
||||
loops.browser.skin.Lobo"
|
||||
provides="zope.interface.Interface"
|
||||
factory="loops.compound.book.browser.UseCase"
|
||||
permission="zope.View" />
|
||||
|
||||
<zope:adapter
|
||||
name="lobo_quote"
|
||||
for="loops.compound.book.interfaces.IPage
|
||||
loops.browser.skin.Lobo"
|
||||
provides="zope.interface.Interface"
|
||||
factory="loops.compound.book.browser.Quote"
|
||||
permission="zope.View" />
|
||||
|
||||
</configure>
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
<metal:part define-macro="text">
|
||||
<tal:cell repeat="cell part/getResources">
|
||||
<div tal:attributes="class cell/cssClass">
|
||||
<span tal:content="structure cell/view/render" />
|
||||
<h3 tal:content="cell/title" />
|
||||
<span tal:content="structure cell/view/render" />
|
||||
</div>
|
||||
</tal:cell>
|
||||
</metal:part>
|
||||
|
|
Loading…
Add table
Reference in a new issue