Skip to main content

Add local styles to subsections in your Plone site.

Project description

collective.localstyles

With this Plone Addon you can add local styles within a subsection of your Plone site.

After installation you can upload a css file, named localstyles.css anywhere to a folderish content item. This css file is then included for this folder and all content items below. The traversing stops for ISite based objects, which a localstyles.css file within a ISite (e.g. a collective.lineage site) isn’t used for folders, which are in higher hierachy of the content tree.

This product registers a viewlet named collective.localstyles.viewlet, which is included in plone.app.layout.viewlets.interfaces.IHtmlHead and is responsible for injecting the localstyles.css file.

This product is inspired by this discussion: http://plone.293351.n2.nabble.com/CSS-for-a-single-page-td7559936.html

Changelog

1.3 (2026-04-04)

  • Add a view variant of the localstyles template. It has the same name as the viewlet: collective.localstyles.styleincluder [thet]

  • Modernize localstyles template. [thet]

1.2 (2020-12-01)

  • Allow localstyles also in ISite roots. [thet]

1.1 (2017-02-13)

Incompatibilities:

  • Changed module-global LOCALSTYLES_FILE to LOCALSTYLES_FILES and allow multiple local style file names. Default are: localstyles.css and localstyles_css. [thet]

New:

  • Add last modification time as URL parameter to be sure to get changed styles through caching. [thet]

1.0 (2014-06-03)

  • Initial.

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

collective_localstyles-1.3.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

collective_localstyles-1.3-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file collective_localstyles-1.3.tar.gz.

File metadata

  • Download URL: collective_localstyles-1.3.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for collective_localstyles-1.3.tar.gz
Algorithm Hash digest
SHA256 a01fb154add6e2f93b6aede34bc2ad3bf18db4c1a07c83b49588ebd7a01e6239
MD5 de082c5b4ad3532f189d690bfadfb3fe
BLAKE2b-256 4c837b3fbb7cd6399a74a9a9d7bd65da725ff2a763ba8cab6cde3be5715b1288

See more details on using hashes here.

File details

Details for the file collective_localstyles-1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for collective_localstyles-1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a834456a357c4e5d2129c4613c63c9f8af7373a0d215617014a3b34a6e1dbab0
MD5 7684fa409871ffe0557de461e2fe09b4
BLAKE2b-256 bdded968c0ab9d02b1f17e8475e90e4b6bb39c56522a74f5277eb9e15c768c28

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