<tal:def define="
  alignment python: options['alignment_selector'] or '';
  capsulestyle options/capsule_style | nothing;
  capsuleid python: options['capsule_id'] or '';
  capsuleclass python: options['capsule_class'] or '';
  capsuletitle options/capsule_title | nothing;
  show_doc_title options/show_title | nothing;
  document options/document | nothing;
">
<!-- Start portlet element -->
<div 
  tal:attributes="
  class python:alignment + ' ' + capsuleclass;
  id capsuleid;
  style capsulestyle; 
">
<h2 class="heading"
  tal:condition="capsuletitle"
  tal:content="structure capsuletitle">
    title....
</h2>
<p class="portlet"
  tal:content="structure python:here.get_portlet_content(show_doc_title,document)">
  document
</p>
</div>
<!-- End portlet element -->
</tal:def>