A suckerfish/superfish integration into plone
Project description
What is it?
collective.superfish is an suckerfish integration into Plone. Suckerfish is a really nice solution for dropdown menus using css, valid xhtml and javascript. http://www.alistapart.com/articles/dropdowns/
How do i use it?
Hide plone.global_sections and replace it with collective.superfish in viewlets.xml somehow like this:
<!-- superfish: use superfish instead of global_sections --> <hidden manager="plone.portalheader" skinname="MySkin"> <viewlet name="plone.global_sections" /> </hidden> <order manager="plone.portalheader" skinname="MySkin"> <viewlet name="collective.superfish" insert-after="plone.global_sections" /> </order>
By default, collecive.superfish does not include portal_actions in the menu. To activate them, subclass the viewlet:
from collective.superfish.browser.sections import SuperFishViewlet as SuperFishBase class SuperFishViewlet(SuperFishBase): ADD_PORTAL_TABS = True
and register it for your skin:
<browser:viewlet name="collective.superfish" manager="plone.app.layout.viewlets.interfaces.IPortalHeader" class=".viewlets.SuperFishViewlet" permission="zope2.View" layer=".interfaces.IThemeSpecific"/>
TODO
Add tests
Add demo.css with some css-styles to make it more usable after installation.
History
0.3 - 2010-03-17
Replace “ with " to keep valid HTML if description contains quotes. [saily]
Made id-generation more resistent against duplicated id’s. We now use normalized urls to generate the item id. [saily]
added support to include portal_tabs in the superfish navigation by setting ADD_PORTAL_TABS = True in subclasses [fRiSi]
added some documentation targeted at integrators [fRiSi]
don’t render superfish_init.js with inline=True since this leads to strange errors in Products.ResourceRegistries-2.0b2-py2.6.egg/Products/ResourceRegistries/browser/scripts.pt eg when adding a StaticText Portlet
AttributeError: 'DirContainedFileResource5' object has no attribute 'POST'
according to the resourceregistry documentation it’s better to set inline to False in any case.
Removed caching after some discussions with fRiSi. We left the code but disabled it by default, enable it again uncommenting the ram.cache line:
#@ram.cache(_render_sections_cachekey) def render(self): return self.index()
Displaying superfish menu only when installed in portal_quickinstaller by adding a superfish-browserlayer through browserlayer.xml file. [saily]
Changed default values for ‘interval’ and ‘timeout’ of hoverIntent which controls the show and hide process of the submenu. Read more about configuration of hoverIntent here: http://cherne.net/brian/resources/jquery.hoverIntent.html
0.2 - 2009-06-12
Moved from full to safe compression for javascript files. [saily]
Removed unused class attributes for SuperFishViewlet. [saily]
Added caching to improve rendering performance. [saily]
0.1 - 2009-06-09
Initial import and idea [saily]
Thanks
Daniel Widerin
Patrick Griffiths
Dan Webb
Joel Birch
Harald Friessnegger (fRiSi)
Links
Suckerfish Dropdowns http://www.alistapart.com/articles/dropdowns
hoverIntent http://cherne.net/brian/resources/jquery.hoverIntent.html
jQuery plugin http://plugins.jquery.com/project/Superfish
jQuery http://jquery.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for collective.superfish-0.3-py2.6.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c1f5170a10f03e082c4ce583d1ad7a406aae5693b911b541266aee633e61789 |
|
MD5 | 935aabf02fd9ad85cdce4d55575f59c4 |
|
BLAKE2b-256 | a2a137a06518b7ffb9744bf558e76fa12439b4de64549881ff796b01983a4bd3 |
Hashes for collective.superfish-0.3-py2.4.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cdcaec95f71a07c61dd51d4f6e6e4e5fb232a8fc36eda5b5747c9b86a5af952 |
|
MD5 | ee64d435c8c1ca28b00af7ea1e94e28e |
|
BLAKE2b-256 | da8108ded468fe58545cfc29a909bb82d13d80d7d89d9224992406cafca206be |