collective.behavior.seo
This small behavior adds extra fields used for SEO optimisation. Inspired by collective.seo, but the data store now uses dexterity/behavior practice.
Features
Adds fields SEO Title, SEO Description, Metatag Robots and Structured Data on an extra tab SEO on contenttypes where the behavior is activated.
When the fields contain values, the <title> and <meta name='description'> in the <head> section will be replaced.
Also a <meta name="robots"> tag will be added.
In a control panel you can give a list of valid combinations of robot tags: follow/nofollow, index/noindex.
A Viewlet for Structured Data called collective.behavior.seo.structured_data register in the HTML Header Area by the plone.app.layout.viewlets.interfaces.IHtmlHead Viewlet Manager
An Interface for Adapter Registration and Resolution ICollectiveSeoStructuredDataAdapter
Use Structured Data
read more: https://schema.org
Two Options to provide Structured Data in the Website.
You can use both options together, the result in the Viewlet will then be concatenated.
If the behavior is not enabled for a Contenttype, but an adapter is registered, then the viewlet will be rendered.
-
use the field in the seo tab
-
register an adapter
<!-- Adapter for a Document - inject JSON LD-->
<adapter
factory="collective.behavior.seo.tests.CustomStructuredDataVariant1"
for="plone.app.contenttypes.interfaces.IDocument
collective.behavior.seo.interfaces.ICollectiveBehaviorSeoLayer"
name="json-ld-variant1"
/>
@implementer(ICollectiveSeoStructuredDataAdapter)
class CustomStructuredDataVariant1:
"""Additional structured data adapter."""
def __init__(self, context, request):
self.context = context
self.request = request
def get_data(self):
""" Return a list or dict with data """
""" see https://schema.org for all possible schema data """
return {
"@context": "https://schema.org/",
"@type": "Organization",
"name": "Plone Team",
"url": "https://plone.org",
}
Translations
This product has been translated into:
- Dutch
- German
translate content, please run
uvx i18ndude rebuild-pot --pot ./src/collective/behavior/seo/locales/collective.behavior.seo.pot --create collective.behavior.seo ./src/collective/behavior/seo
uvx i18ndude sync --pot ./src/collective/behavior/seo/locales/collective.behavior.seo.pot ./src/collective/behavior/seo/locales/*/LC_MESSAGES/collective.behavior.seo.po
Installation
Install collective.behavior.seo by adding it to your buildout:
[buildout]
...
eggs =
collective.behavior.seo
and then running bin/buildout.
Or install it with pip.
Activate the add'on in the Plone Contron Panel. Then go to Dexterity Types in the Plone Control Panel and activate this behavior on selected content types.
Contribute
- Issue Tracker: https://github.com/collective/collective.behavior.seo/issues
- Source Code: https://github.com/collective/collective.behavior.seo
License
The project is licensed under the GPLv2.
Contributors
- Zest Software, info@zestsoftware.nl
- 1letter
This add'on is a combination of several SEO add'ons and improvements for Plone 5.1:
- Title, description seo fields based on collective.seo https://github.com/collective/collective.seo for Plone 5.1+
Changelog
3.1.1 (2026-10-09)
Bug fixes
- move
seo_structured_datafield toseofieldset @1letter #21
3.1.0 (2026-10-09)
New features
- add structured data field to behavior @1letter
Internal
-
generate po files with uvx, remove
pkg_resources$ uvx i18ndude rebuild-pot --pot ./src/collective/behavior/seo/locales/collective.behavior.seo.pot --create collective.behavior.seo ./src/collective/behavior/seo $ uvx i18ndude sync --pot ./src/collective/behavior/seo/locales/collective.behavior.seo.pot ./src/collective/behavior/seo/locales/*/LC_MESSAGES/collective.behavior.seo.po@1letter
-
update config with plone.meta @1letter
Tests
- add more tests, increase test coverage @1letter
3.0.0 (2026-03-10)
Breaking changes
- Make package Plone 6.2 ready. Use native namespaces.
Still works on Plone 6.0 and 6.1, but due to the native namespaces it could conflict with other
collectivepackages. [1letter]
2.0.2 (unreleased)
- Nothing changed yet.
2.0.1 (2024-01-25)
- Update Translations for 'nl' and add translations for 'de' [1letter]
2.0.0 (2023-03-14)
-
Fix ValueError during editing when robot tags in control panel are not unique. Fixes
issue 2 <https://github.com/collective/collective.behavior.seo/issues/2>_. [maurits] -
Add Continuous Integration for supported Plone and Python combinations. Uses tox, gh-actions, and
collective/tox-action <https://github.com/collective/tox-action>_. [maurits] -
Drop support for Python 2. Plone 5.2 and 6.0 on Python 3 are supported. For older versions, use releases from the 1.x branch. [maurits]
1.0.2 (2023-03-14)
-
Removed English locale. I think there used to be a need for this long time ago, but not anymore, as far as I know. [maurits]
-
Changed
<head>to'head'in help text and translations.<head>gets swallowed: you got "the section of a page" and now "the 'head' section of a page". [maurits] -
Fixed broken html in edit form on Plone 6 due to Dutch typo. We used
<headand this made the Save/Cancel buttons show only on the SEO fieldset. And this fieldset showed an extra footer. [maurits]
1.0.1 (2020-09-09)
- Make python3.8 compatible. [fredvd]
1.0.0 (2020-08-17)
-
Make python3 compatible. [erral]
-
Update uninstall profile. [fredvd]
1.0b1 (2018-10-30)
-
Add robots field, Add control panel form with configurable list of robot tag preset combinations for editors to pick from. [fredvd]
-
Don't generate robots vocabulary on every request. [fredvd, mauritsvanrees]
-
Fix implementer decorator on SEOFields behavior in python. The zcml registration was correct though. [fredvd]
-
Revert name changes. [jladage]
-
Improve description of robots field. [jladage]
-
Autopep8 and fix code-analysis feedback. [jladage]
1.0a1 (2018-10-12)
-
Override update method on TitleViewlet instead of page_title, otherwise Site title still gets appended to the overridden title. [fredvd]
-
Basic version, only for Title and Description [fredvd]
Metadata
Release files for collective.behavior.seo 3.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| collective_behavior_seo-3.1.1.tar.gz | 35.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| collective_behavior_seo-3.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 82.5 kB
Release files / collective_behavior_seo-3.1.1.tar.gz
| Download URL | collective_behavior_seo-3.1.1.tar.gz |
|---|---|
| Size | 35.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
47803e0306ee3b33e843d0a658b5fc0a551e2094358bb97b5497edec2afd61c8
|
|
BLAKE2b-256 checksum How to use checksums |
c140b468e29a9b14546617a5e8fa47cb8298a2934d870f3c500939042b40b369
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|
Release files / collective_behavior_seo-3.1.1-py3-none-any.whl
| Download URL | collective_behavior_seo-3.1.1-py3-none-any.whl |
|---|---|
| Size | 46.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
89ff1cf4e5f7bcbb3471697fdfe0cd14fd0e5f02e40f8fc4ddb711af587e968e
|
|
BLAKE2b-256 checksum How to use checksums |
9ec3557c0a07fd1ef83ce9cc078f999b1e475d1ddf15003e84a428308cb6f69b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|