Skip to main content

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.3 (2010/12/20)

  • fix to add just first level classname [erral]

1.2 (2010/12/01)

  • remove the method to check if the context is the default page of a INavigationRoot element. This product is not the place for that [erral]

1.1 (2010/11/25)

  • added a new method to the view to check whether the current context item is a INavigationRoot item or a default-page of a INavigationRoot item [erral]

1.0.1 (2010/11/09)

  • fix documentation [erral]

1.0 (2010/11/08)

  • Initial release [erral]

Metadata

Release files for cs.bodysection 1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cs.bodysection 1.4
File Size Uploaded Provenance Actions
cs.bodysection-1.4.zip 17.3 kB Without provenance Details for cs.bodysection-1.4.zip

Release files / cs.bodysection-1.4.zip

Download URL cs.bodysection-1.4.zip
Size 17.3 kB
Tags Source
SHA-256 checksum
How to use checksums
efa4c5115312acd19203c7ee1c1805169d96e2b601a3d5736851ce7c581099cf
BLAKE2b-256 checksum
How to use checksums
60acb10b5565dfae381f18eaee2beec993c608007cef8e9c985330bfdc021d7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for cs.bodysection 1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.4 This release

1 release file No provenance

1.1

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page