Creating a static-text portlet
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">
<div class="portlet" id="portlet-static">
<h5 i18n:translate="box_statis">Your Title</h5>
<div class="portletBody">
<div class="portletContent odd">
Your static content here
</div>
<div class="portletContent even">
More static content here
</div>
</div>
</div>
</div>
</body>
</html>
You can call this from a right or left slot with here/portlet_static/macros/portlet.
this doesn't work
Site Error
An error was encountered while publishing this resource.
AttributeError
Sorry, a site error occurred.
Traceback (innermost last):
Module ZPublisher.Publish, line 175, in publish_module_standard
Module Products.PlacelessTranslationService.PatchStringIO, line 51, in new_publish
Module ZPublisher.Publish, line 132, in publish
Module Zope.App.startup, line 204, in zpublisher_exception_hook
Module ZPublisher.Publish, line 101, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 39, in call_object
Module Products.CMFCore.PortalContent, line 116, in __call__
Module Shared.DC.Scripts.Bindings, line 306, in __call__
Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
Module Products.CMFCore.FSPageTemplate, line 191, in _exec
Module Products.CMFCore.FSPageTemplate, line 124, in pt_render
Module Products.PageTemplates.PageTemplate, line 96, in pt_render