Attention

This document was written for an unsupported version of Plone, Plone 2.5.x, and was last updated 833 days ago.

For more information, see the version support policy.

To learn how to upgrade to the current version of Plone, read the upgrade manual.

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>

Contribute

Something wrong or out of date? Anybody can edit or create a new article in the knowledge base. Simply create an account on this site, log in, and click the Edit button to contribute.