Big Search
Let the user search for a major, alumni group, etc. from a curated set of content with defined keywords.
Standard Big Search
Introduced in Version 1.0.0
CleanSlate Implementation Notes What’s this?
When Using a Shared Partial
- Add a
wvu-big-searchpartial to a template. -
Add
content_keysthe custom data attributes of any page template that will be used on pages that will get searched, like this:- content_keys: title: Content Keys for Big Search -
Add
enable_keywordsthe custom data attributes of any page template that will be used on pages that will get searched, like this:- enable_keywords: type: checkbox title: Enable keywords? -
Add
search_actionto the custom data attributes of any page template that will be used on pages that will get searched, like this:- search_action: title: Search action - Add an action to the
Search Actionfield i.e.{directory-of-results-page}/{slug-of-search-results-page}#anchor-resultsin your page’s custom data. - Create a template that will display your search results using the
Big Search Resultscomponent. - For your results page, list editable regions to be searched (in addition to the
keywordsregion) in theContent Keys for Big Searchfield in your page’s custom data. - For each page that you want to search, check the
Enable keywordsbox in the page’s custom data. - List keywords in the
Keywordseditable region at the bottom of each page to be searched. -
Include the following code in your
default.htmlayout after your footer:<r:if v1="{$enable_keywords}" v2="1" op="="> <r:edit_mode_only> <div class="container py-4"> <h2>Keywords</h2> <r:editable_region name="keywords" /> </div> </r:edit_mode_only> </r:if>
When Using the Super Template
- Add a
big-searchcomponent to a slot. -
Add
content_keysthe custom data attributes of any page template that will be used on pages that will get searched, like this:- content_keys: title: Content Keys for Big Search -
Add
enable_keywordsthe custom data attributes of any page template that will be used on pages that will get searched, like this:- enable_keywords: type: checkbox title: Enable keywords? -
Add
search_actionto the custom data attributes of any page template that will be used on pages that will get searched, like this:- search_action: title: Search action - Add an action to the
Search Actionfield i.e.{directory-of-results-page}/{slug-of-search-results-page}#anchor-resultsin your page’s custom data. - Create a page that will display your search results using the
Big Search Resultstemplate. - For your results page, list editable regions to be searched (in addition to the
keywordsregion) in theContent Keys for Big Searchfield in your page’s custom data. - For each page that you want to search, check the
Enable keywordsbox in the page’s custom data. - List keywords in the
Keywordseditable region at the bottom of each page to be searched. - Include the following code in your
default.htmlayout after your footer:<r:if v1="{$enable_keywords}" v2="1" op="="> <r:edit_mode_only> <div class="container py-4"> <h2>Keywords</h2> <r:editable_region name="keywords" /> </div> </r:edit_mode_only> </r:if>
Element Styles
- If you want to add a background image, upload your image to Files and label the image with
{page-slug}-big-search-{instance-number}-background.
If you need help customizing your theme, check out our tutorials for creating a CleanSlate theme, creating a CleanSlate template using a WVU Design System component, and using the Super Template. We also have a Beginner’s Guide.
Standard Big Search
Introduced in Version 1.0.0
Another Big Search Header
Type your search term below.
Not sure what to search for? Browse our categories.
CleanSlate Implementation Notes What’s this?
When Using a Shared Partial
- Add a
wvu-big-searchpartial to a template. -
Add
content_keysthe custom data attributes of any page template that will be used on pages that will get searched, like this:- content_keys: title: Content Keys for Big Search -
Add
enable_keywordsthe custom data attributes of any page template that will be used on pages that will get searched, like this:- enable_keywords: type: checkbox title: Enable keywords? -
Add
search_actionto the custom data attributes of any page template that will be used on pages that will get searched, like this:- search_action: title: Search action - Add an action to the
Search Actionfield i.e.{directory-of-results-page}/{slug-of-search-results-page}#anchor-resultsin your page’s custom data. - Create a template that will display your search results using the
Big Search Resultscomponent. - For your results page, list editable regions to be searched (in addition to the
keywordsregion) in theContent Keys for Big Searchfield in your page’s custom data. - For each page that you want to search, check the
Enable keywordsbox in the page’s custom data. - List keywords in the
Keywordseditable region at the bottom of each page to be searched. -
Include the following code in your
default.htmlayout after your footer:<r:if v1="{$enable_keywords}" v2="1" op="="> <r:edit_mode_only> <div class="container py-4"> <h2>Keywords</h2> <r:editable_region name="keywords" /> </div> </r:edit_mode_only> </r:if>
When Using the Super Template
- Add a
big-searchcomponent to a slot. -
Add
content_keysthe custom data attributes of any page template that will be used on pages that will get searched, like this:- content_keys: title: Content Keys for Big Search -
Add
enable_keywordsthe custom data attributes of any page template that will be used on pages that will get searched, like this:- enable_keywords: type: checkbox title: Enable keywords? -
Add
search_actionto the custom data attributes of any page template that will be used on pages that will get searched, like this:- search_action: title: Search action - Add an action to the
Search Actionfield i.e.{directory-of-results-page}/{slug-of-search-results-page}#anchor-resultsin your page’s custom data. - Create a page that will display your search results using the
Big Search Resultstemplate. - For your results page, list editable regions to be searched (in addition to the
keywordsregion) in theContent Keys for Big Searchfield in your page’s custom data. - For each page that you want to search, check the
Enable keywordsbox in the page’s custom data. - List keywords in the
Keywordseditable region at the bottom of each page to be searched. - Include the following code in your
default.htmlayout after your footer:<r:if v1="{$enable_keywords}" v2="1" op="="> <r:edit_mode_only> <div class="container py-4"> <h2>Keywords</h2> <r:editable_region name="keywords" /> </div> </r:edit_mode_only> </r:if>
Element Styles
- Apply these utility classes to component container:
bg-wvu-neutral--black text-white text-center wvu-bg-blend-mode-luminosity - If you want to add a background image, upload your image to Files and label the image with
{page-slug}-big-search-{instance-number}-background.
If you need help customizing your theme, check out our tutorials for creating a CleanSlate theme, creating a CleanSlate template using a WVU Design System component, and using the Super Template. We also have a Beginner’s Guide.