Skip to main content

A responsive menu for Plone themes.

Project description

Introduction

This package provides a responsive replacement for the plone.global_sections viewlet. But note that just installing this theme in itself does not replace anything. You will have to adjust your theme to make use of this package.

Set up edition1.menu in your theme product

Add the package as dependency to you theme product. To do so add edition1.menu to the section install_requires in your setup.py:

install_requires=[
     'setuptools',
     # -*- Extra requirements: -*-
     'edition1.menu',
 ],

Next, add edition1.menu to your metadata.xml:

<dependencies>
   <dependency>profile-edition1.menu:default</dependency>
</dependencies>

Run your buildout.

Next you need to add the viewlet to your browser configure.zcml:

<!-- Responsive menu -->
<browser:viewlet
  name="edition1.menu.responsive"
  manager="plone.app.layout.viewlets.interfaces.IPortalHeader"
  class="edition1.menu.viewlets.menu.MenuViewlet"
  layer=".interfaces.IThemeSpecific"
  permission="zope2.View"
/>

Everything is in place. Now you have to hide the global.navigation viewlet, because you use the edition1 responsive menu instead:

<order manager="plone.portalheader" skinname="Your Theme" purge="True">
   <viewlet name="plone.global_sections" remove="true" />
</order>

<hidden manager="plone.portalheader" skinname="Your Theme">
   <viewlet name="plone.global_sections" />
</hidden>

Start up your instance and go to plone control panel/Add-ons. Install edition1.menu. Go back to control panel and click on “Menu settings” in the section Add-on Configuration. You can configure the minimal width of the wide menu, navigation tree depth and maximal number of items in wide menu.

Contributors

  • Mark van Lent, markvl, Edition1

  • Mirella van Teulingen, mirelvt, Edition1

Changelog

0.1a7 (2013-12-20)

  • Add ‘parent’ and ‘current’ classes to <li> tags of the menu. [maciekz]

0.1a6 (2013-11-20)

  • Fix error when actions are in the menu (like the Home item) that have no children. [markvl]

0.1a5 (2012-11-28)

  • Load setMenuSize() in the template, instead of on document.ready. Otherwise you will see the menu in the wrong layout before it is styled correctly. [mirella]

0.1a4 (2012-11-26)

  • Fix the fix of the small menu. The small menu stopped working when it was expanded and the windows was resized from small to big and back again. [markvl]

0.1a3 (2012-11-26)

  • Small fix where the small menu is expanded when the window is resized from big to small. [markvl]

0.1a2 (2012-11-22)

  • Add a configuration option to always use the small menu when there are more than X menu items. (So we can prevent overflowing the menu even on ‘desktop’ screens.) [markvl]

  • Make the small version of the menu work: start with children collapsed (hidden) and expand (visible) when needed. First click expands, second click collapses. [markvl]

  • Use a class to mark that a menu item has children. (And remove the hard coded greater than sign.) [markvl]

  • Remove duplication from the menu templates by moving the complete <ul> structure to the menu_recurse template. [markvl]

0.1a1 (2012-11-15)

  • Package created using templer [markvl]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

edition1.menu-0.1a7.zip (38.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page