An experimental, Views-based taxonomy manager:
- browse large taxonomies (assumes non-hierarchical vocabularies)
- filter using Search API Database search (offers English stemming)
- e.g. performer matches perform, performer, performance
- apply Views Bulk Operations actions to terms
- merge multiple terms to a single term
- move term to a different vocabulary
Currently assumes use in the context of Islandora (https://islandora.ca).
This module is a Drupal feature, and requires:
- controlled_access_terms
- controlled_access_terms_defaults
- csv_serialization
- rest
- search_api
- search_api_db
- search_api_solr
- serialization
- taxonomy
- term_merge with patch from https://www.drupal.org/project/term_merge/issues/3089426#comment-14179070 for Create Action for Views Bulk Operations
- term_reference_change with patch from https://git.drupalcode.org/project/term_reference_change/-/merge_requests/2.patch for merging references in typed_relation fields
- user
- views
- views_bulk_operations
- views_data_export
If you manage your site dependencies via Composer then this module's dependencies will be installed automatically once the module itself is installed via Composer.
After enabling the module, ensure all terms are indexed in the CCA Taxonomy Manager Term index /admin/config/search/search-api/index/cca_taxonomy_manager_term_index
Browe a taxonomy via path such as /admin/structure/taxonomy/manage/{vocabulary}/cca-search
, e.g. /admin/structure/taxonomy/manage/person/cca-search
.
Ensure the "Merge taxonomy terms" permission is assigned appropriately.
@todo: check if it is necessary to ensure users managing terms have Fedora Admin role to persist term changes into fcrepo.
- To move a term, browse or search within
/admin/structure/taxonomy/manage/{vocabulary}/cca-search
to locate the term(s). - Check the (views bulk operations) checkbox on left of terms table.
- Choose "Move term" option from Action select widget.
- Click "Apply to selected items" button.
- Choose target vocabulary from select widget.
- Click "Apply" button.
- A batch process will start, "Performing Move term on selected entities"...
Warning: term move does not account for hierarchies, nor does it account for the possible difference in fields assigned to taxonomy terms in different vocabularies.
@todo: define what will survive a move, e.g. term name, description.
- To merge one or more terms, browse or search within
/admin/structure/taxonomy/manage/{vocabulary}/cca-search
to locate the term(s) to be merged (but not the target term). - Check the (views bulk operations) checkbox on left of terms table.
- Choose "Merge terms" option from Action select widget.
- Click "Apply to selected items" button.
- Choose target term from Existimg term autocomplete widget.
- Click "Apply" button.
Warning: the patch for term_reference_change must be applied in order to update reference in typed_relation fields (e.g. Islandora Object Linked Agent field).
Warning: redirects are not added automatically, e.g. from old term to target term.
e.g. for a vocabulary tags
:
- Visit view edit for CCA Taxonomy Manager search
/admin/structure/views/view/cca_taxonomy_manager_search/edit/admin_page
- Duplicate page:
- On new display, set machine_name=tags`; this needs to match the machine name of the taxonomy that we are overriding the term listing for.
- Set path=
admin/structure/taxonomy/manage/tags/overview
(this is the path of the core term listing for tags) - Set Menu to be Type=Menu tab, Menu link title=List, Parent=Structure > Taxonomy > Tags, Weight=-5 (i.e. under the default vocabulary list menu item)
- Click "Save" button.
- Visit
admin/config/cca_taxonomy_manager/settings
, check Keywordstags
, click "Save configuration". - Now visit
admin/structure/taxonomy/manage/tags/overview
to confirm List display is from CCA Taxonomy Managertags
display instead of the Drupal core taxonomy term listing.
To override additional taxonomy term lists, repeat the process of (a) add a view display, (b) adding a new menu tab for the List item, (c) updating CCA Taxonomy Manager settings to specify the taxonomy.
- Page title on cca-search view is vocabulary machine name, not human label.
- Jonathan Hunt - https://www.drupal.org/u/jonathan_hunt