CMS Development

tmcmillan99
Contributor | Elite Partner
Contributor | Elite Partner

Search Input module parameters

SOLVE

I am adding the search input to the blog post template and can't seem to figure out the correct parameters to search blog posts only. I have added the code below to the post template-

 

{% module "search_input" path="@hubspot/search_input" %}

 

What parameters do I use to search blog posts only? I thought it would be pretty straightforward but for some reason I can't find anything in the documentation.

I have tried type='BLOG_POST' and value='BLOG_POST' but neither have worked. Site pages are still being included.

 

Thanks,

Terry McMillan

 

0 Upvotes
1 Accepted solution
tmcmillan99
Solution
Contributor | Elite Partner
Contributor | Elite Partner

Search Input module parameters

SOLVE

I found the answer in the CMS reference docs - 

https://developers.hubspot.com/docs/cms/building-blocks/modules/default-modules

 

Solution-

{% module "search_input" path="@hubspot/search_input" content_types={ "website_pages": false, "landing_pages": false, "blog_posts": true, "knowledge_articles": false } %}

View solution in original post

1 Reply 1
tmcmillan99
Solution
Contributor | Elite Partner
Contributor | Elite Partner

Search Input module parameters

SOLVE

I found the answer in the CMS reference docs - 

https://developers.hubspot.com/docs/cms/building-blocks/modules/default-modules

 

Solution-

{% module "search_input" path="@hubspot/search_input" content_types={ "website_pages": false, "landing_pages": false, "blog_posts": true, "knowledge_articles": false } %}