<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Setting up a content search bar for one blog in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Setting-up-a-content-search-bar-for-one-blog/m-p/758881#M32929</link>
    <description>&lt;P&gt;This is a great help for what I'm looking for. But, the suggestions dropdown doesn't seem to work for me, when I start typing in the input field. They should be appended to the '.hs-search-field__suggestions' element (according to the JS).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does this work for you?&lt;/P&gt;</description>
    <pubDate>Tue, 21 Feb 2023 10:21:38 GMT</pubDate>
    <dc:creator>LParkinson</dc:creator>
    <dc:date>2023-02-21T10:21:38Z</dc:date>
    <item>
      <title>Setting up a content search bar for one blog</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Setting-up-a-content-search-bar-for-one-blog/m-p/438739#M23163</link>
      <description>&lt;P&gt;I'm working to implement search functionality for a client's website, which has many pages and two blogs. My goal is to create a search input that, when used, returns results from just one of the blogs. Currently, my search input looks like this, adapted from the search_input module:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;div class="hs-search-field"&amp;gt; 
    &amp;lt;div class="hs-search-field__bar"&amp;gt; 
      &amp;lt;form action="/pubresultspage"&amp;gt;
        &amp;lt;input type="text" class="hs-search-field__input" name="term" autocomplete="off" aria-label="{{ "Search" }}" placeholder="{{ "Search Publications" }}"&amp;gt;

          &amp;lt;input type="hidden" name="type" value="BLOG_POST"&amp;gt;
        
      &amp;lt;/form&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;ul class="hs-search-field__suggestions"&amp;gt;&amp;lt;/ul&amp;gt;
&amp;lt;/div&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With this, I have limited the search results to blog posts, but how can I limit it further to just ONE blog? I am definitely in over my head, so any ideas would be appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 18 May 2021 18:13:49 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Setting-up-a-content-search-bar-for-one-blog/m-p/438739#M23163</guid>
      <dc:creator>SLee6</dc:creator>
      <dc:date>2021-05-18T18:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up a content search bar for one blog</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Setting-up-a-content-search-bar-for-one-blog/m-p/438979#M23176</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/153294"&gt;@SLee6&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try appending a &amp;amp;pathPrefix= to the form action something like this below that will only filter anything in that one blog if its something like domain.com/blog2/blog-post-name. I've done this cloning the hubspot search module but they also included javascript that you need to also include the pathPrefix as well. Not sure if you have JS in your module or if this is in your blog listing code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;form action="/{{ site_settings.content_search_results_page_path }}?&amp;amp;pathPrefix=blog2" onSubmit="return false"&amp;gt; &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 12:17:26 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Setting-up-a-content-search-bar-for-one-blog/m-p/438979#M23176</guid>
      <dc:creator>jonchim</dc:creator>
      <dc:date>2021-05-19T12:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up a content search bar for one blog</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Setting-up-a-content-search-bar-for-one-blog/m-p/439488#M23206</link>
      <description>&lt;P&gt;Thank you for the assist!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, I am using a cloned search_input module, including the javascript.&lt;/P&gt;&lt;P&gt;I was able to use &amp;amp;pathPrefix as you suggested to filter the search results to a single blog. I implemented it a little differently:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;div class="hs-search-field"&amp;gt; 
  &amp;lt;div class="hs-search-field__bar"&amp;gt;
    &amp;lt;form action="/{{ site_settings.content_search_results_page_path }}"&amp;gt; 
      &amp;lt;input type="text" class="hs-search-field__input" name="term" autocomplete="off" aria-label="{{ "Search" }}" placeholder="{{ "Placeholder Text" }}"&amp;gt;
      &amp;lt;input type="hidden" name="type" value="BLOG_POST"&amp;gt;
      &amp;lt;input type="hidden" name="pathPrefix" value="blog-name"&amp;gt;
    &amp;lt;/form&amp;gt;
  &amp;lt;/div&amp;gt;
  &amp;lt;ul class="hs-search-field__suggestions"&amp;gt;&amp;lt;/ul&amp;gt;
&amp;lt;/div&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This the search filter to display as seen below, which solves the problem!&lt;/P&gt;&lt;P data-unlink="true"&gt;https://www.websitename.com/hs-search-results?term=your+search+term&amp;amp;type=BLOG_POST&amp;amp;pathPrefix=blog-name&lt;/P&gt;</description>
      <pubDate>Thu, 20 May 2021 13:53:15 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Setting-up-a-content-search-bar-for-one-blog/m-p/439488#M23206</guid>
      <dc:creator>SLee6</dc:creator>
      <dc:date>2021-05-20T13:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up a content search bar for one blog</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Setting-up-a-content-search-bar-for-one-blog/m-p/650557#M29118</link>
      <description>&lt;P&gt;THANK YOU!! &lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt; &lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 08:28:54 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Setting-up-a-content-search-bar-for-one-blog/m-p/650557#M29118</guid>
      <dc:creator>CHugo</dc:creator>
      <dc:date>2022-06-16T08:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up a content search bar for one blog</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Setting-up-a-content-search-bar-for-one-blog/m-p/758881#M32929</link>
      <description>&lt;P&gt;This is a great help for what I'm looking for. But, the suggestions dropdown doesn't seem to work for me, when I start typing in the input field. They should be appended to the '.hs-search-field__suggestions' element (according to the JS).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does this work for you?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 10:21:38 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Setting-up-a-content-search-bar-for-one-blog/m-p/758881#M32929</guid>
      <dc:creator>LParkinson</dc:creator>
      <dc:date>2023-02-21T10:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up a content search bar for one blog</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Setting-up-a-content-search-bar-for-one-blog/m-p/1127912#M42530</link>
      <description>&lt;P&gt;I can't seem to get this to work. How do you get the blog name to populate dynamically in a blog listing template? I have a module field called {{ module.blog }} but it only returns the blog ID, not the blog name ... which I'm assuming the blog name is the same thing as the url slug, correct? I tried that and it's not working either.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Mar 2025 15:06:25 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Setting-up-a-content-search-bar-for-one-blog/m-p/1127912#M42530</guid>
      <dc:creator>fair</dc:creator>
      <dc:date>2025-03-26T15:06:25Z</dc:date>
    </item>
  </channel>
</rss>

