Guest User

Untitled

a guest
Jul 17th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. make a page template called portlet_mynews (put it in custom folder or on-disk skin folder or anywhere else)
  2.  
  3. <dl metal:define-macro="portlet" class="portlet">
  4. <dt>News!</dt>
  5. <dd tal:repeat="item python:context.portal_catalog(portal_type='NewsItem', state='published')">
  6. <p tal:content="item/Title">[title]</p>
  7. <p tal:content="item/Description">[descrip]</p>
  8. </dd>
  9. </dl>
  10.  
  11. and then you can add this as a "classic portlet" -- the name is portlet_mynews, and the macro is "portlet"
Add Comment
Please, Sign In to add comment