Filter home page categories into sections | Community
Skip to main content

Filter home page categories into sections

  • July 8, 2024
  • 0 replies
  • 0 views

Marla11

Hi, thanks in advance if anyone has ideas.
Does anyone know a way to organize the help center home page like this (imagine the brackets represent a box to click):

Product A
[ Category 1  ]  [ Category 2 ]  [ Category 3 ]
Product B
[ Category 3 ]  [Category 4 ]
Product C
[ Category 5 ]

Ideally I would like to just make a simple modification of the loop in the Copenhagen home_page.hbs file by using #is or #if statements that use the category ID. Something like --

{{#each categories}}
  <h2>Product A</h2>
    {{#is id 123 456 789}}
      {{#if ../has_multiple_categories}}
         <ul class="blocks-list">
           <li class="blocks-item">
             <a href='{{url}}' class="blocks-item-link">
               <span class="blocks-item-title">{{name}}</span>
               <span class="blocks-item-description">{{excerpt description}}</span>
             </a>
           </li>
         </ul>

  <h2>Product B</h2>

    {{#is id 012 345}}
      {{#if ../has_multiple_categories}}
        <ul class="blocks-list">
          <li class="blocks-item">
            <a href='{{url}}' class="blocks-item-link">
              <span class="blocks-item-title">{{name}}</span>
              <span class="blocks-item-description">{{excerpt description}}</span>
            </a>
         </li>
       </ul>

     ……

I know #is statements don't work like that - I'm just trying to show the type of thing I'm going for.

 

Thanks if anyone has a tip. We are on the Growth plan. Otherwise I would nest pages.