localgovdrupal / localgov_directories
LocalGovDrupal distribution: Directories feature.
Installs: 80 727
Dependents: 6
Suggesters: 0
Security: 0
Stars: 1
Watchers: 8
Forks: 3
Open Issues: 79
Type:drupal-module
Requires
- drupal/core: ^10.2
- drupal/facets: ^2.0.7
- drupal/pathauto: ^1.6
- drupal/search_api: ^1.29
- drupal/search_api_autocomplete: ^1.3
- drupal/search_api_location: 1.0.0-alpha4
- localgovdrupal/localgov_core: ^2.12
- localgovdrupal/localgov_geo: ^2.0
Requires (Dev)
- drupal/facets_form: ^1.0
- localgovdrupal/localgov_openreferral: ^2.0
- localgovdrupal/localgov_paragraphs: ^2.3
- localgovdrupal/localgov_services: ^2.1
Suggests
- drupal/facets_form: Displays facets as checkboxes within a form.
- localgovdrupal/localgov_openreferral: Enables Open Referral output of Directories
- localgovdrupal/localgov_paragraphs: For Directory Promo Page content type in Directories
- 3.x-dev
- 3.2.2
- 3.2.1
- 3.2.0
- 3.1.8
- 3.1.7
- 3.1.6
- 3.1.5
- 3.1.4
- 3.1.3
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.0
- 3.0.0-beta1
- 3.0.0-alpha6
- 3.0.0-alpha5
- 3.0.0-alpha4
- 3.0.0-alpha3
- 3.0.0-alpha2
- 3.0.0-alpha1
- 2.x-dev
- 2.5.5
- 2.5.4
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4.1
- 2.4.0
- 2.3.7
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3.0
- 2.2.0
- 2.1.6
- 2.1.5
- 2.1.4
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.x-dev
- 1.0.1
- 1.0.0
- 1.0.0-alpha5
- 1.0.0-alpha4
- 1.0.0-alpha3
- 1.0.0-alpha2
- 1.0.0-alpha1
- dev-feature/3.x/394-drupal-11-support
- dev-fix/3.x/minor-rector-fixes
- dev-release-3.x
- dev-feature/3.x/326-facets-form-support
- dev-feature/326/facets-form-support
- dev-fix/3.x/coding-standards-from-drupal-coder-update
- dev-fix/3.x/use-a-tagged-release
- dev-feature/333-multiple-addresses
- dev-fix/3.x/drop-drupal-10-1-support
- dev-fix/3.x/370-cannot-reinstall
- dev-389/fix/is-syncing
- dev-directory-field-test-creation-trait
- dev-372-select-directory-channel-view
- dev-fix/381-search-api-location-version
- dev-feature/718-content-tabs-weights-directories-module
- dev-feature/3.x/localgov-600-autopopulate-preview-links
- dev-fix/3.x/deprecation
- dev-feature/360-title-fulltext
- dev-fix/3.x/355-facet-config
- dev-fix/3.x/355-facet-block
- dev-AWearring-patch-facets2_0_7
- dev-fix/3.x/phpdoc-fixes
- dev-feature/346-block-conditions
- dev-feature/3.x-manual-github-action
- dev-fix/cs-strict-types
- dev-fix/3.x/340-change-field-formatter-default-for-Enquiries-email-from-text-to-email
- dev-fix/9.2-deprecated-code-checks
- dev-feature/3.x/php-8-2-workflow
- dev-feature/3.x/538-change-to-when-tabs-shown
- dev-feature/3.x-193-facet-groups
- dev-feature/3.x-change-to-full-localgov_geo
- dev-feature/193-use-an-and-query-between-facet-groups-and-or-within-them-filter
- dev-update/dev-dependency-localgov-openreferral
- dev-fix/315-php-phpstan-issues
- dev-fix/3.x/php-8.2-warnings
- dev-release-2.x
- dev-fix/3.x/reset-link
- dev-fix/localgov-546/menu-link-group
- dev-fix/missing-show-reset-link-2
- dev-fix/3.x/fix-github-tests
- dev-feature/295-coding-standards
- dev-fix/missing-show-reset-link
- dev-fix/facet-reset-filter-unit-test
- dev-doc/2.x/proximity-search-doc-update
- dev-feature/3.x/geo_entity
- dev-fix/3.x/update-block-condition
- dev-feature/3.x/281-facets-are-optional
- dev-feature/281-facets-are-optional
- dev-feature/193/clone-test
- dev-feature/drupal-10
- dev-feature/2.x/281-facet-documentation
- dev-fix/2.x/283-standardise-field-order
- dev-feature/2.x/257-cross-channel-facets
- dev-fix/2.x/proximity-search-facet-tpl
- dev-feature/2.x/189-proximity-search
- dev-193-use-an-and-query-between-facet-groups-and-or-within-them
- dev-feature/2.x/load-maps-when-tab-clicked/265
- dev-fix/2.x/259-import-failure
- dev-feature/2.x/254-promopage-pathauto-update
- dev-feature/2.x/url-alias-promo-page
- dev-feature/194-remove-error-message
- dev-fix/search-block-cache-context
- dev-bug/2.x/promo-page
- dev-fix/2.x/229-empty-views-map
- dev-fix/2.x/228-install-missing-fields
- dev-feature/layout-paragraphs-2
- dev-feature/2.x/promo-page-admin-improvements
- dev-feature/2.x/primary-banner
- dev-feature/1.x/embed-views-promo/221
- dev-fix/215-search-result-highlight-site-search
- dev-fix/localgov-core_142-pathauto_patterns
- dev-fix/2.x/213-ld_db_module_schema
- dev-feature/2.x/seperate-index-server
- dev-feature/2.x/149-new-directory-page
- dev-feature/2.x/149-new-directory-page-readme
- dev-feature/2.x/swap-shared-field
- dev-fix/194-remove-missing-block-error-message
- dev-feature/2.x/localgov_geo--24-leaflet-2
- dev-fix/localgov_openreferral-29-fix-error-response
- dev-fix/178-missing-description
- dev-fix/175-facets-2-update
- dev-fix/172-deprecated-function
- dev-bugfix/167-tests-default-theme
- dev-feature/2.x/261-Open-Referral
- dev-feature/158-scarfolk
- dev-feature/2.x/57-sort-order
- dev-fix/2.x/100-repeated-back-to-results-link
- dev-release-1.x
- dev-feature/1.x/145-dependencies-fix
- dev-feature/2.x/localgov-geo-browser
- dev-fix/73-search-results
- dev-bug/93-remove-dupe-search
- dev-fix/94-dropdown
- dev-feature/100-back-to-search-results-link
- dev-feature/2.x/261-POC-Open-Referral
- dev-feature/localgov-259-search-1.x
- dev-feature/alpha-sort-without-the-etc
- dev-feature/97-no-pager-for-map
- dev-bug-87-map-loading-in-vertical-tabs
- dev-fix/localgov-alpha-dependencies
- dev-fix/unneeded-exposed-filter-form-on-map
- dev-fix/facet-widget-looses-values-and-not-required
- dev-fix/tests-php
- dev-fix/facet-config-ignore
- dev-hotfix/fatal-when-no-facets-on-directory
- dev-fix/52-map-attachment-embed
- dev-fix/map-facets
- dev-fix/collection-name-typo
- dev-fix/directory-facets-label
- dev-feature/better-facet-group-heading
- dev-fix/38-teaser-view-for-dir-entry
- dev-fix/39-checkbox-facet-items
- dev-feature/78-naming-conventions
- dev-feature/28-fix-tests
- dev-feature/6-missing-schema-leaflet-views
- dev-feature/24-github-workflow
- dev-fix/30-directory-type-validation
- dev-feature/channel-facets-display--free-text-search--search-on-entry-page
- dev-feature/4-venue
- dev-features/2-basic-page
This package is auto-updated.
Last update: 2024-12-18 13:47:30 UTC
README
Provides directories (channels) which have entries (pages, venues, etc.) which can be filtered and searched.
Enabling the module
The 'LocalGov Directories' module enables the core functionality. You will need a search backend: 'LocalGov Directories Database' will provide this. You can use other search backends, for example solr, if doing so it is advisable to disable the Database module first.
For the directories you will also need at least one content Entry type, these can be created or supplied by the Directories submodules, see the Directory Entries section below.
Facets
Facets types, and their facet values. Create types (eg. "Size"), and values (eg. "Large", "Medium", "Small"). These can then be used on entries to filter to them.
The automatically enabled Facets are their own entity type. They are intended for creation and management by content editors on the production site. Adding a facet type will automatically make it available on Directory Channels, and add any values to the Facet block on the page, without any additional site building. As such by design they are excluded from configuration export.
Using Taxonomy Term Facets
If you want a controlled or imported taxonomy you can add standard taxonomy term facets to you directory index. Do this as you would with any search api index: This requires creating the vocabulary. Adding the vocabulary to the appropriate content type. Adding it to the index. Placing the block on the appropriate channel pages.
Directories (Channels)
A content type that defines which entries can be posted into the directory, and which facets are enabled on it.
Manage display of directory channel - listings
The localgov_directories module provides a couple of extra psuedo-field to help with the listing of entries by embedding the view 'localgov_directory_channel'.
- "Directory listing": display a list of directory entries generated by the embedded view.
- "Directory listing (with search box)": display a list of directory entries generated by the embedded view with an exposed search form.
You can enable or disable these at /admin/structure/types/manage/localgov_directory/display
Manage display of directory channel - maps
The localgov_directories_location module provides an extra psuedo-field to help with the display of entries on a map by embedding the 'embed_map' display of the 'localgov_directory_channel' view.
- "Directory map": display a map of directory entries which have locations.
You can enable or disable these at /admin/structure/types/manage/localgov_directory/display
Directory Entries
Entries are put into one or more directory (channel). The primary directory defines the path, and breadcrumb to the item.
Page
The basic directory entry. It has fields for which directory (channel), and what facet values (depending on the available facet types defined by the enabled channels. It also has contact information.
Venue
A directory entry with a location to be shown on a map. Requires the localgov geo module.
Organisation
This simple entry is primarily used if you enable Directories Open Referral. The standard requires all Services, by default mapped to Venues, have an Organisation. Other directory entry types (see Extending directory entries) can be mapped to Open Referral as appropriate.
Promotional pages
A directory entry with additional fields with paragraphs for richer presentation. Better for brouchure type entries than services information. This type of entry would be more difficult to map for Open Referral or any other standard or format, but good for adding images and styling on the site.
LocalGov Drupal Services Integration
If you have the LocalGov Services module installed, directories (channels) can optionally be put into services. The path to the directory channel will then be service > directory, and an entry: service > directory > entry.
Extending directory entries
New content types can be created to go into directories by adding the
localgov_directory_channels
and localgov_directory_facets_select
fields.
The form widgets, and selection type, for each field ensure the correct options for the content creator: Selector "LocalGov: Directories channels selection" ensures only the channels that allow that content type can be posted, "Directories facets selection" is relatively redundant; the two widgets "Directory channels" and "Directory entry facets" work together to ensure the correct directories can be chosen as primary and secondary, and that with them the correct facets can then be selected.
New content types in directories can have which ever other fields you want added to them.
The content type should be automatically added to the search index when you add
the directory fields. You may want to create a directory index
display mode
as this will be used for the full text search indexing.
Staging 'Directory facet types'
By default facet types are not exported to configuration and are treated as
content an administrator user can create on production. If you want to have
types in configuration as vocabularies would be on the site to create and
export the facet types set:
$settings['localgov_directories_stage_site'] = TRUE;
and it will be exported with other configuration. Any types that exist in
configuration will be imported.
Proximity search
Proximity search is made available when:
- The Directory search backend supports location search. At the moment the search_api_solr search backend from the search_api_solr module is the only such known backend.
- At least one of the available Directory entry content types (e.g. localgov_directories_venue) is using location through the localgov_location field.
When location search is available, a new "Proximity search settings" choice field becomes available in Directory channel forms. Activating this will present a Proximity search filter as part of the channel search form.
The Proximity search filter uses the following distances out-of-the-box: 1km for 1/2 mile, 2km for 1 mile, 3km for 2 miles, 5km for 3 miles, 8km for 5 miles, and 16km for 10 miles. These mappings are not exact. This is due to Solr's insistence on using round Kilometer values during location-based filtering. To update these distance values, edit the Proximity filter's settings in the Directory channel view's Embed: Proximity search and Embed map displays.
Supported database backends
The dev release of the search_api module now supports location-based search in database search backends. Supported database versions are:
- MySQL 5.7 and later.
- MariaDB 10.2.38, 10.3.29, 10.4.19, 10.5.10 and later.
Block placement
When using a theme other than the default LocalGov Base or LocalGov Scarfolk, the Directory channel search (machine id: localgov_directories_channel_search_block), Directory facets (machine id: facet_block:localgov_directories_facets) and Directory facets for proximity search (machine id: facet_block:localgov_directories_facets_proximity_search) blocks should be made visible for the Directory Channel content type. They can be added to a sidebar region (or equivalent) of the site theme.
Note that the facet_block:localgov_directories_facets block becomes available only after you have created at least one Directory entry content type. On the other hand the facet_block:localgov_directories_facets_proximity_search block becomes available when a Directory entry content type with a localgov_location field is created (e.g. localgov_directories_venue).
On the Directory entry content types the blocks are also available as 'fields' in the Fields display configuration if you prefer to place them within the content that way.