sitegeist / taxonomy
Manage vocabularies and taxonomies as separate node-hierarchy.
Installs: 64 184
Dependents: 2
Suggesters: 0
Security: 0
Stars: 14
Watchers: 7
Forks: 15
Open Issues: 20
Type:neos-package
Requires
- neos/content-repository: *
- neos/fusion-form: >=2.1.0
- neos/neos: ^7.1 || ^8.0 || dev-master
- neos/neos-ui: ^7.1 || ^8.0 || dev-master
- dev-main
- v1.4.0
- v1.3.9
- v1.3.8
- v1.3.7
- v1.3.6
- v1.3.5
- v1.3.4
- v1.3.3
- v1.3.2
- v1.3.1
- v1.3.0
- v1.2.3
- v1.2.2
- v1.2.1
- v1.2.0
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.1
- v1.0.0
- dev-neos9-beta15
- dev-neos9-beta11
- dev-neos-9
- dev-tetheredNodes
- dev-feature/fusionRendering
- dev-dependabot/npm_and_yarn/Resources/Private/Scripts/TaxonomyEditor/url-parse-1.5.10
- dev-dependabot/npm_and_yarn/Resources/Private/Scripts/TaxonomyEditor/tar-4.4.19
- dev-dependabot/npm_and_yarn/Resources/Private/Scripts/TaxonomyEditor/elliptic-6.5.4
- dev-dependabot/npm_and_yarn/Resources/Private/Scripts/TaxonomyEditor/lodash-4.17.21
- dev-dependabot/npm_and_yarn/Resources/Private/Scripts/TaxonomyEditor/ini-1.3.8
- dev-bugfix/neos82support
- dev-dependabot/npm_and_yarn/Resources/Private/Scripts/TaxonomyEditor/decode-uri-component-0.2.2
- dev-task/neos-9
- dev-sorting
- dev-task/adjustmentsForNeos7
- dev-mficzel-patch-1
- dev-dependabot/npm_and_yarn/Resources/Private/Scripts/TaxonomyEditor/websocket-extensions-0.1.4
- dev-dependabot/npm_and_yarn/Resources/Private/Scripts/TaxonomyEditor/mixin-deep-1.3.2
- dev-supportNewerNeosVersions
- dev-bugfix/taxonomyToggleInsideSummary
- dev-bugfix/emptyTagSelection
- dev-task/43786/optimizeTaxonomySelection
This package is auto-updated.
Last update: 2024-11-11 20:00:37 UTC
README
Manage vocabularies and taxonomies in Neos as node in a separate subtree
/taxonomies
distinct from/sites
Authors & Sponsors
- Martin Ficzel - ficzel@sitegeist.de
The development and the public releases of this package is generously sponsored by our employer http://www.sitegeist.de.
About
If taxonomies are defined as documents in the /sites
subtree of the Neos ContentRepository, things tend to get
complicated:
- If the meaning of an item is determined by its position in a hierarchy, it is complicated to add more than one relation or relations for different contexts.
- Mixing Taxonomies (meaning) with content (presentation) leads to a complicated structure that often is hard to comprehend for editors.
- It is hard to share taxonomies across multiple sites.
- It is hard to ensure taxonomies exist in all needed dimensions since this also affects the site structure.
- Limiting read and write access to taxonomies inside sites is possible but not trivial.
Sitegeist.Taxonomies store vocabularies and taxonomies as nodes outside of the /sites
hierarchy in the content
repository. This way, the meaning of the taxonomy relations can be expressed better, taxonomies can be used across
multiple sites and the taxonomy documents can be defined without interfering with the taxonomy meaning.
It also provides a separate backend module for managing vocabularies and taxonomies.
Installation
Sitegeist.Taxonomy is available via packagist composer require sitegeist/taxonomy
.
We use semantic-versioning, so every breaking change will increase the major version number.
Storing vocabularies and taxonomies in the ContentRepository
Sitegeist.Taxonomy defines three basic node types:
Sitegeist.Taxonomy:Root
- The root node at the path/taxonomies
, allows only vocabulary nodes as childrenSitegeist.Taxonomy:Vocabulary
- The root of a hierarchy of meaning, allows only taxonomies nodes as childrenSitegeist.Taxonomy:Taxonomy
- An item in the hierarchy that represents a specific meaning allows only taxonomy nodes as children
If you have to enforce the existence of a specific vocabulary or taxonomy, you can use a derived node type:
Vendor.Site:Taxonomy.Root: superTypes: Sitegeist.Taxonomy:Root: TRUE childNodes: animals: type: 'Sitegeist.Taxonomy:Vocabulary'
And configure the taxonomy package to use this root node type instead of the default:
Sitegeist: Taxonomy: contentRepository: rootNodeType: 'Vendor.Site:Taxonomy.Root' vocabularyNodeType: 'Sitegeist.Taxonomy:Vocabulary' taxonomyNodeType: 'Sitegeist.Taxonomy:Taxonomy'
Referencing taxonomies
Since taxonomies are nodes, they are simply referenced via reference
or references
properties:
taxonomyReferences: type: references ui: label: 'Taxonomy References' inspector: group: taxonomy editorOptions: nodeTypes: ['Sitegeist.Taxonomy:Taxonomy'] startingPoint: '/taxonomies' placeholder: 'assign Taxonomies'
If you want to limit the selectable taxons to a vocabulary or even a taxonomy, then you can configure a more specific startingPoint:
taxonomyReferences: ui: inspector: editorOptions: startingPoint: '/taxonomies/animals/mammals'
Content-Dimensions
Vocabularies and Taxonomies will always be created in all base dimensions. This way, it is ensured that they can always be referenced. The title and description of a taxons and vocabularies can be translated as is required for the project.
CLI Commands
The taxonomy package includes some CLI commands for managing the taxonomies.
taxonomy:list
List all taxonomy vocabulariestaxonomy:import
Import taxonomy content, expects filename + vocabulary-name (with globbing)taxonomy:export
Export taxonomy content, expects filename + vocabulary-name (with globbing)taxonomy:prune
Prune taxonomy content, expects vocabulary-name (with globbing)
Privileges
Sitegeist.Taxonomy brings the following privilege targets to allow you to restrict read access, management and editing of taxonomies:
Sitegeist.Taxonomy:Module.Show
Show the backend Module and explore the existing taxonomies by default granted to Editors.Sitegeist.Taxonomy:Module.ManageVocabularyActions
Add, edit and delete vocabularies. By default granted to Administrators.Sitegeist.Taxonomy:Module.ManageTaxonomyActions
Add, edit and delete taxons. By default granted to Administrators.
Reading and referencing taxonomies from other nodes is currently not limited.
Extensibility
Packages can add additional fields to the forms of taxonomies and vocabularies. To do this the following steps are required.
- Extend the NodeTypes
Sitegeist.Taxonomy:Taxonomy
orSitegeist.Taxonomy:Vocabulary
in your package. - Add tha path to your additional
Root.fusion
to the Setting in pathSitegeist.Taxonomy.backendModule.additionalFusionIncludePathes
. - In the fusion code define each field as prototype that accepts the props
name
plustaxon
&defaultTaxon
resp.vocabulary
&defaultVocabulary
. - Register addtional prototypesNames by adding them to the Settings
Sitegeist.Taxonomy.backendModule.additionalVocabularyFieldPrototypes
orSitegeist.Taxonomy.backendModule.additionalTaxonomyFieldPrototypes
Contribution
We will gladly accept contributions. Please send us pull requests.
License
See LICENSE