I want to know that how to call a method which is in file system (createPictMenu .py in my case) from TAL Portlet(from zmi) which is in @@manage-portlets(in the Add Portlet drop down list).
I did like this
1.Created one new class for the address(tal portlet) in my createPictMenu. py
2.I then registered the portlet in configure.zcml.
Here is my code bit:
And my configure.zcml looks like this :
And in Zmi:
In zmi i did the following things localhost:8080/myproject/@@manage-portlets --> AddPortlet(drop down list)--> selected TAL Portlet option-> Then i gave title as address and for description i given the code to call the address_tal from createPictMenu. py.
address_tal:
i dont know how to call a method of a file which is in file system from zmi @@manage-portlets->TAL portlet. Please help
I did like this
1.Created one new class for the address(tal portlet) in my createPictMenu. py
2.I then registered the portlet in configure.zcml.
Here is my code bit:
Code:
class address_tal(BrowserView)
def myaddress()
address_bar = ViewTemplatePageFile('templates/address_left.pt')--> (this
is the template page which i want in my newly created address portlet manage-
portlets)
Code:
<plone:portlet
name="collective.portlet.tal.TALPortlet"
interface="collective.portlet.tal.talportlet.ITALPortlet"
assignment="collective.portlet.tal.talportlet.Assignment"
view_permission="zope2.View"
edit_permission="cmf.ManagePortal"
renderer=".browser.createPictMenu.address_tal"
addview="collective.portlet.tal.talportlet.AddForm"
editview="collective.portlet.tal.talportlet.EditForm"
/>
And in Zmi:
In zmi i did the following things localhost:8080/myproject/@@manage-portlets --> AddPortlet(drop down list)--> selected TAL Portlet option-> Then i gave title as address and for description i given the code to call the address_tal from createPictMenu. py.
address_tal:
Code:
<span tal:define="global li python:view.myaddress()">
<span tal:replace="structure python:li" />
</span>