Skip to content

Search customizations

Maria Fisher edited this page May 11, 2021 · 6 revisions

Details the customizations done to search results found at /resources, /events, and /experts.

This work is primarily done in The WRI search module

What modules support this?

Easiest to look at the info file for an initial workup:

Customizations - Search

There is also custom code within The WRI search module that accomplishes the following things.

Customizations related to Search

  • The WRI taxonomy module contains code to alter the canonical url for a Taxonomy term and redirect some terms to the /resources page. This is also described in the Content Editor's Guide
  • Several blocks have links to the Resources page based on the fields used to filter the results of the blocks. These values are passed as tokens to the block, then translated into the pretty-path solr value for the same filters. Code for that is found in the WRI Resource link field formatter. For example, if you create a listing block as detailed in the content editor's guide the default value of the More Link field is internal:/resources?all_topics=[block_content:field_tag:entity:root:tid]&within_this_topic=[block_content:field_tag:entity:non_orphan]&type_of_resource=[block_content:field_filter_by_resource_type:entity:root:tid]&subtype=[block_content:field_filter_by_resource_type:entity:non_orphan]&tags=[block_content:field_filter_by_tag:target_id]&region=[block_content:field_filter_by_region:entity:root:tid]&country=[block_content:field_filter_by_region:entity:non_orphan] which would translate into something like internal:/resources?all_topics=123&within_this_topic=456&type_of_resource=789 etc. The code in the "WRI Resource link field formatter" uses the Pretty Path Helper service to turn connect the facet name "all_topics" to the pretty path you'd get if you selected that value for "all_topics".
Clone this wiki locally