Whatever you see in the Connect 211 Community Resource Directory is reflected in the URL. keywords, taxonomies, filters, search radius, location, all of it. This article will cover how to recognize the parts of the URL and create custom links into the app.
Where to use Custom Links.
Custom link can be used inside your Resource Directory:
In custom Header and Footer buttons.
In Category Subtopics.
By default, Subtopic link are defined by keywords or taxonomy codes only. If you want to include extra dimensions like location or filters, then we need to construct the whole URL and use that for the link.
They can also be used almost anywhere:
Website landing pages
SMS messages
Emails / Newsletters
Chat and messenger platforms
Social Media posts
Anatomy of a search link.
Let’s break down what’s happening inside this example Resource Directory URL:
https://search.wa211.org/search?query=BH-1800.8500-150&query_label=Overnight+Shelters&query_type=taxonomy&location=Yakima%2C+Washington%2C+United+States&radius=25&lat=46.601557&lon=-120.510842&query_language=en&focus_population=Single+Women
Let's break that down in a list:
https://search.wa211.org/search- The base URL, your domain name?query=BH-1800.8500-150- The phrase or taxonomy code(s) we are searching on&query_label=Overnight+Shelters- What displays in the search bar&query_type=taxonomy- The type of query, either taxonomy or text (keyword)&location=Yakima%2C+Washington%2C+United+States- The location displayed&radius=25- An optional distance filter&lat=46.601557&lon=-120.510842- The location data we actually need&query_language=en- The language we're querying in&focus_population=Single+Women- An example of a facet, or filter
These eight parameters (everything after the base URL) fall into three categories to work with. Let's explore in more detail.
What we’re searching.
query_type
There are three query types:
texttaxonomysemantic(coming soon)
query
The actual query we are searching on. For query types of text and semantic this is free text. For taxonomy this can be a comma delimited list of taxonomy codes.
Taxonomy codes use partial matching. This means that with systems like HSIS you can use “rollups” in your searches. In other words a taxonomy search for BH-1800 will return all records tagged this this code and all children of this code.
query_label
This is what gets displayed to users in the search field.
For text and organization searches you really want this to reflect the actual query value. However, it’s a handy way to display more user friendly labels for taxonomy or multi-taxonomy searches.
Where we’re searching.
location, lat, and lon
When &location= is provided, returned results will automatically filter out resources where the service area does not include this location. &location= provides the pretty, reader friendly version of this place. location must always be paired with &lat= and &lon in order to function correctly.
Our Resource Directory will not automatically fill-in latitude and longitude at this time. Those must be provided by the system or person creating links. All links taken directly out of our user facing Resource Directory will have the correct lat/long provided.
radius
An optional parameter to further filter results down by search radius. The value any will effectively turn off this filter.
Values must match one of the options in the live instance of your search engine.
Filters and eligibility.
Custom filters defined in your data set may also be used in the URL. In the example above, we have a filter for focus_population with a value of Single+Women. The filters available will depend on your particular data, and are not available with all data sets.
If a Resource Directory has filters and you check them, then you will automatically see them reflected in the URL. This is a great way to figure out how they are named 🙂
Summary
Custom search links are an amazing tool for sharing important and targeted resources with specific audiences. If you have questions or would like some training and consultation, please don’t hesitate to reach out: [email protected]
