localgovdrupal / localgov_directories
LocalGovDrupal 分发版:目录功能。
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.x-dev#cf3e546770099b1f136c020ade79a650d4178ad6
- localgovdrupal/localgov_core: ^2.12
- localgovdrupal/localgov_geo: ^2.0
Requires (Dev)
Suggests
- 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.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-fix/3.x/coding-standards-from-drupal-coder-update
- dev-fix/3.x/use-a-tagged-release
- dev-release-3.x
- 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-09-24 11:34:09 UTC
README
提供目录(频道),这些目录包含条目(页面、场所等),可以进行筛选和搜索。
启用模块
'LocalGov Directories' 模块启用了核心功能。您需要一个搜索后端:'LocalGov Directories Database' 将提供这个后端。您可以使用其他搜索后端,例如 solr,如果这样做,建议首先禁用 Database 模块。
对于目录,您还需要至少一个内容条目类型,这些类型可以是目录子模块创建或提供的,请参阅下面的“目录条目”部分。
面元
面元类型及其面元值。创建类型(例如,“大小”),以及值(例如,“大”、“中”、“小”)。然后可以在条目上使用它们进行筛选。
自动启用的面元是它们自己的实体类型。它们旨在由生产站点的内容编辑器创建和管理。添加面元类型将自动使其在目录频道上可用,并将任何值添加到页面上的面元块中,无需任何额外的站点构建。因此,它们被设计为排除在配置导出之外。
使用分类法术语面元
如果您想要一个受控或导入的分类法,您可以将标准分类法术语面元添加到您的目录索引中。像处理任何搜索 api 索引一样这样做:这需要创建词汇表。将词汇表添加到适当的内容类型。将其添加到索引。在适当的频道页面上放置块。
目录(频道)
一种内容类型,它定义了哪些条目可以发布到目录中,以及在该目录上启用了哪些面元。
管理目录频道显示 - 列表
localgov_directories 模块提供了一些额外的伪字段,通过嵌入 'localgov_directory_channel' 视图来帮助按条目列表显示。
- "目录列表":显示由嵌入视图生成的目录条目列表。
- "目录列表(带搜索框)":显示由嵌入视图生成的目录条目列表,并带有暴露的搜索表单。
您可以在 /admin/structure/types/manage/localgov_directory/display 中启用或禁用这些功能。
管理目录频道显示 - 地图
localgov_directories_location 模块通过嵌入 'localgov_directory_channel' 视图的 'embed_map' 显示提供了额外的伪字段,以帮助在地图上显示条目。
- "目录地图":显示具有位置的目录条目地图。
您可以在 /admin/structure/types/manage/localgov_directory/display 中启用或禁用这些功能。
目录条目
条目被放入一个或多个目录(频道)中。主目录定义了项目的路径和面包屑。
页面
基本的目录条目。它包含目录(频道)字段,以及根据启用的频道定义的可用的面元值字段。它还包括联系信息。
场所
具有要在地图上显示的位置的目录条目。需要 localgov geo 模块。
组织
此简单条目主要用于启用 Directories Open Referral。标准要求所有服务(默认映射到场所)都有一个组织。其他目录条目类型(请参阅扩展目录条目)可以按适当方式映射到 Open Referral。
促销页面
具有附加字段和段落以进行更丰富展示的目录条目。比服务信息更适合手册类型条目。此类条目在映射到 Open Referral 或任何其他标准或格式时可能更困难,但适合在网站上添加图像和样式。
本地政府Drupal服务集成
如果您已安装本地政府服务模块,可以将目录(频道)作为服务进行选择。此时目录频道的路径将变为服务 > 目录,并且有一个条目:服务 > 目录 > 条目。
扩展目录条目
可以通过添加 localgov_directory_channels
和 localgov_directory_facets_select
字段来创建新的内容类型以放入目录中。
每个字段的表单小部件和选择类型确保内容创建者有正确的选项:选择器 "LocalGov: 目录频道选择" 确保只有允许发布该内容类型的频道可以发布,"目录方面选择" 相对冗余;两个小部件 "目录频道" 和 "目录条目方面" 协同工作,确保可以选择正确的目录作为主目录和副目录,并且可以从中选择正确的方面。
目录中的新内容类型可以添加任何其他您希望添加的字段。
当您添加目录字段时,内容类型应自动添加到搜索索引中。您可能需要创建一个 目录索引
显示模式,因为这将被用于全文搜索索引。
暂存 '目录方面类型'
默认情况下,方面类型不会导出到配置文件中,并且被视为管理员用户可以在生产环境中创建的内容。如果您希望将类型作为词汇表在配置中创建和导出方面类型,设置: $settings['localgov_directories_stage_site'] = TRUE;
它将与其他配置一起导出。任何存在于配置中的类型都将被导入。
邻近搜索
邻近搜索在以下情况下可用
- 目录搜索后端支持位置搜索。目前,来自 search_api_solr 模块 的 search_api_solr 搜索后端是唯一已知的此类后端。
- 至少有一个可用的目录条目内容类型(例如 localgov_directories_venue)通过 localgov_location 字段使用位置。
当位置搜索可用时,在目录频道表单中会出现一个新的 "邻近搜索设置" 选择字段。激活此功能将在频道搜索表单中显示邻近搜索过滤器。
邻近搜索过滤器默认使用以下距离:1km 对应 1/2 英里,2km 对应 1 英里,3km 对应 2 英里,5km 对应 3 英里,8km 对应 5 英里,16km 对应 10 英里。这些映射不是精确的。这是由于 Solr 在基于位置的过滤期间坚持使用圆形千米值。要更新这些距离值,请编辑 目录频道 视图中的 嵌入:邻近搜索 和 嵌入地图 显示中的邻近搜索过滤器的设置。
支持的数据库后端
search_api 模块的开发版本 现在支持数据库搜索后端中的基于位置搜索。支持的数据库版本有
- MySQL 5.7 及以上。
- MariaDB 10.2.38、10.3.29、10.4.19、10.5.10 及以上。
区块放置
当使用除默认 LocalGov Base 或 LocalGov Scarfolk 之外的主题时,应将 目录频道搜索(机器 ID:localgov_directories_channel_search_block)、目录方面(机器 ID:facet_block:localgov_directories_facets)和 邻近搜索的目录方面(机器 ID:facet_block:localgov_directories_facets_proximity_search)区块设置为可见,以供 目录频道 内容类型使用。它们可以被添加到网站主题的侧边栏区域(或等效区域)。
请注意,facet_block:localgov_directories_facets 块仅在您创建至少一个目录条目内容类型后才可用。另一方面,facet_block:localgov_directories_facets_proximity_search 块在创建包含 localgov_location 字段的目录条目内容类型(例如 localgov_directories_venue)时可用。
在目录条目内容类型上,如果您喜欢将它们放置在内容中,这些块也作为 '字段' 在字段显示配置中可用。