Customize plone portlet

i hope readers knows about plone, portlet, viewlet, python,configure.zcml and stuffs like that

1. go to buildout-cache/eggs

2. find the plone.app.portlets product

3. go to plone.app.portlets.portlets folder find the portlet you want to customize, for example I wanna customize search portlet  and add a bootstrap class

4. now i think you have a plone3 theme product if not create one and install also you can add this in any product but best is to add in theme product

5. now in theme product browser folder, add a folder called portlets

6. now in browser/configure.zcml add this line to include portlets folder

  <include package=”.portlets” />

7. inside portlets copy the files from plone.app.portlets.portlets folder , for my example i copied search.pt

8. create __init__.py and configure.zcml in portlets folder

configure.zcml:

<configure xmlns=”http://namespaces.zope.org/zope&#8221;
xmlns:browser=”http://namespaces.zope.org/browser&#8221;
xmlns:plone=”http://namespaces.plone.org/plone”&gt;

<plone:portletRenderer
portlet=”plone.app.portlets.portlets.search.ISearchPortlet”
template=”search.pt”
layer=”..interfaces.IThemeSpecific”
/>

</configure>

9. change anything in search.pt

10. restart plone

 

Advertisements
About

Work is fun!

Tagged with: , , , , , , ,
Posted in Plone theme, ploneCMS, python, Tips And Tricks, Zope

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Disclaimer
All content provided on this "tareqalam.com" blog is for informational purposes only. The owner of this blog makes no representations as to the accuracy or completeness of any information on this site or found by following any link on this site. The owner of [tareqalam.wordpress.com] will not be liable for any errors or omissions in this information nor for the availability of this information. The owner will not be liable for any losses, injuries, or damages from the display or use of this information.
June 2013
M T W T F S S
« May   Jul »
 12
3456789
10111213141516
17181920212223
24252627282930

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 23 other followers

%d bloggers like this: