add new node view 'ContentView' for showing target content without title and description
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3245 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
cb975d38c7
commit
204e66f791
3 changed files with 36 additions and 6 deletions
|
@ -476,14 +476,21 @@
|
|||
menu="zmi_views" title="Configure"
|
||||
/>
|
||||
|
||||
<zope:adapter
|
||||
name="content"
|
||||
for="loops.interfaces.INode
|
||||
zope.publisher.interfaces.browser.IBrowserRequest"
|
||||
provides="zope.interface.Interface"
|
||||
factory="loops.browser.node.ContentView"
|
||||
permission="zope.View" />
|
||||
|
||||
<zope:adapter
|
||||
name="listpages"
|
||||
for="loops.interfaces.INode
|
||||
zope.publisher.interfaces.browser.IBrowserRequest"
|
||||
provides="zope.interface.Interface"
|
||||
factory="loops.browser.node.ListPages"
|
||||
permission="zope.View"
|
||||
/>
|
||||
permission="zope.View" />
|
||||
|
||||
<zope:adapter
|
||||
name="listresources"
|
||||
|
@ -491,8 +498,7 @@
|
|||
zope.publisher.interfaces.browser.IBrowserRequest"
|
||||
provides="zope.interface.Interface"
|
||||
factory="loops.browser.node.ListResources"
|
||||
permission="zope.View"
|
||||
/>
|
||||
permission="zope.View" />
|
||||
|
||||
<zope:adapter
|
||||
name="listchildren"
|
||||
|
@ -500,8 +506,7 @@
|
|||
zope.publisher.interfaces.browser.IBrowserRequest"
|
||||
provides="zope.interface.Interface"
|
||||
factory="loops.browser.node.ListChildren"
|
||||
permission="zope.View"
|
||||
/>
|
||||
permission="zope.View" />
|
||||
|
||||
<page
|
||||
name="external_edit"
|
||||
|
|
|
@ -586,6 +586,11 @@ class SpecialNodeView(NodeView):
|
|||
return self
|
||||
|
||||
|
||||
class ContentView(SpecialNodeView):
|
||||
|
||||
macroName = 'content_only'
|
||||
|
||||
|
||||
class ListPages(SpecialNodeView):
|
||||
|
||||
macroName = 'listpages'
|
||||
|
|
|
@ -92,6 +92,26 @@
|
|||
|
||||
<!-- named views -->
|
||||
|
||||
<metal:body define-macro="content_only">
|
||||
<tal:nodebody define="body item/body"
|
||||
condition="body">
|
||||
<div class="content-1"
|
||||
tal:content="structure body"
|
||||
tal:attributes="id string:${view/itemNum}.body;">
|
||||
Body
|
||||
</div><br />
|
||||
</tal:nodebody>
|
||||
<div tal:define="target nocall:item/targetObjectView"
|
||||
tal:condition="nocall:target">
|
||||
<div class="content-1 subcolumn" id="1.body"
|
||||
tal:attributes="class string:content-$level;"
|
||||
tal:content="structure target/render">
|
||||
The body
|
||||
</div>
|
||||
</div>
|
||||
</metal:body>
|
||||
|
||||
|
||||
<metal:body define-macro="listpages">
|
||||
<div class="content-1"
|
||||
tal:content="structure item/body"
|
||||
|
|
Loading…
Add table
Reference in a new issue