I've registered a custom portletmanager, but for some reason I can
only add collections and static.text portlets

The files involved are: configure.zcml, interfaces.py,
quotationsportlets.pt, quotationsportlets.pt,
profiles/default/portlets.xml see them below:


<configure
            xmlns="http://namespaces.zope.org/zope";
            xmlns:five="http://namespaces.zope.org/five";
            xmlns:browser="http://namespaces.zope.org/browser";
            xmlns:i18n="http://namespaces.zope.org/i18n";
            i18n_domain="MQMS">



<!-- stuff for quotations portlet -->
<browser:viewlet
    name="quotation.portlets"
    manager=".interfaces.IQuotationsPortlets"
    template="quotationsportlets.pt"
    permission="zope2.View"
/>


<browser:page
    for="plone.portlets.interfaces.ILocalPortletAssignable"
    class="plone.app.portlets.browser.manage.ManageContextualPortlets"
    name="manage-bottomportlets"
    template="manageportlets.pt"
    permission="plone.app.portlets.ManagePortlets"
/>

</configure>




# interfaces.py
###################

from plone.portlets.interfaces import IPortletManager

class IQuotationsPortlets(IPortletManager):
    """custom quotations portlet manager
    """

# manageportlets.pt
<html xmlns="http://www.w3.org/1999/xhtml";
      xmlns:metal="http://xml.zope.org/namespaces/metal";
      xmlns:tal="http://xml.zope.org/namespaces/tal";
      xmlns:i18n="http://xml.zope.org/namespaces/i18n";
      metal:use-macro="context/main_template/macros/master"
      i18n:domain="plone">
<head>
    <div metal:fill-slot="javascript_head_slot" tal:omit-tag="">
        <link type="text/css" rel="kinetic-stylesheet"
            tal:attributes="href
string:${context/absolute_url}/++resource++manage-portlets.kss"/>
    </div>
</head>
<body>
<div metal:fill-slot="main">
  <h1 class="documentFirstHeading">Manage Quotation Bottom Portlets</h1>
  <span tal:replace="structure provider:quotation.portlets" />
</div>
</body>
</html>


# quotationsportlets.pt
<tal:block replace="structure provider:quotation.portlets" />


#profiles/default/portlets.xml
<?xml version="1.0"?>
<portlets>
 <portletmanager
   name="quotation.portlets"
   type="Products.MQMS.browser.interfaces.IQuotationsPortlets"
 />
</portlets>

_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to