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 details)

Uploaded Source

File details

Details for the file edition1.menu-0.1a7.zip.

File metadata

  • Download URL: edition1.menu-0.1a7.zip
  • Upload date:
  • Size: 38.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for edition1.menu-0.1a7.zip
Algorithm Hash digest
SHA256 449780cbaf4b8385442abab858f5f35632f32415ac1d8cf42b951d0cbf686c83
MD5 fd88b6a09cd3bf20ce742005683f5296
BLAKE2b-256 ec44fe9b310f8072375eae9f8dad15663b83136b344edb64ae5d7c08b86480a1

See more details on using hashes here.

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