Skip to main content

Extra view to add section name for Plone. Specially useful when having INavigationRoot based sites (like ones with LinguaPlone

Project description

Introduction
============

After the INavigationRoot fixes in previous versions of Plone, if you install
LinguaPlone 4.x in Plone 4.x you will end having section-es, section-en, and so
on in your site.

That's because LinguaPlone 4.x adds root folder for each language in your site
and sets them INavigationRoot interface.

In some projects you need content-based section identifiers for your body to get
them styled property by your designer.

That's what you get with this small products. It just have a browser view with
one method. Add it to your main_template in this way::

<body tal:define="isRTL portal_state/is_rtl;
sl python:plone_view.have_portlets('plone.leftcolumn', view);
sr python:plone_view.have_portlets('plone.rightcolumn', view);
root_content context/@@navigation_root_content;
body_content_class root_content/section_content_body_class;
body_class python:plone_view.bodyClass(template, view) + ' ' + body_content_class;
sunburst_view python:context.restrictedTraverse('@@sunburstview')"

In this way your body tag will have an extra content-section-your-items-id class
and yet preserve the section-es (or the one for your language).

Useful? It is useful for us :)

Use
----

Add it to your buildout::

eggs =
...
cs.bodysection

And run buildout. No need to install it.

Changelog
=========

1.0dev (unreleased)
-------------------

- Initial release

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

cs.bodysection-1.0.zip (16.6 kB view details)

Uploaded Source

File details

Details for the file cs.bodysection-1.0.zip.

File metadata

  • Download URL: cs.bodysection-1.0.zip
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cs.bodysection-1.0.zip
Algorithm Hash digest
SHA256 63c0803ffa8c042b857ae88549b1cd34537c831b7ae0f690e505899df7df3509
MD5 0f1bb782fc5860c9949c95d88196e8e6
BLAKE2b-256 22fb7acc8f86ceb38ad2bf35c7c29112a83df609f423424f67b26cd3fff6e39b

See more details on using hashes here.

Supported by

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