Creating a static-text portlet

by Alan Runyan last modified Feb 10, 2011 09:38 PM
Contributors: Joel Burton
The simplest portlet you can make: static, with no special logic.

To create a portlet containing static text, save the following code in a page template called 'portlet_static' in the 'Custom' folder of your 'portal_skins'. Code:

<html xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      i18n:domain="plone">
<body>

<!-- The static box -->
<div metal:define-macro="portlet" tal:omit-tag="">
    <dl class="portlet" id="portlet-static">
       <dt class="portletHeader">Title</dt>
       <dd class="portletItemSingle odd">Some content</dd>
       <dd class="portletItemSingle even">Some content</dd>
       <dd class="portletItemSingle odd lastItem">Last item</dd>
    </dl>
</div>
</body>
</html>