CMS Development

MaximSiebert
メンバー | Solutions Partner
メンバー | Solutions Partner

Filter Sidebar

解決

I'm looking to create a filter sidebar for my field group items - similar to done on this page https://www.blueprintsys.com/resources. I have the items listed on this page https://www.ada.support/learning-centre. I've added a 'choice' field to my field group so that for each item I can pick if it's an ebook/webinar/etc. Now I'm looking to create the filter sidebar.

 

My first instinct is to create a text repeater field which I would add all the types from the field group choice field to, then using jquery/css to hide and show items based on which text repeater item is selected.

 

This feels very hacky and I was wondering if there's a better way to achieve this.

 

Thanks in advance!

0 いいね!
1件の承認済みベストアンサー
cbarley
解決策
元HubSpot社員
元HubSpot社員

Filter Sidebar

解決

Hi @MaximSiebert , do you have access to HubDB? If so, I'd say this would be quite easy to set up without the browser having to render all items, and hide them with CSS. 

 

This article (https://designers.hubspot.com/docs/tutorials/how-to-build-a-real-estate-listing-with-hubdb) has a really great example of filtering capabilities with HubDB. 

 

Your CSS/Jquery solution is definitely okay too, as long as the number of items doesn't get too large, and you don't have to render out a ton of things to the DOM initially

元の投稿で解決策を見る

0 いいね!
3件の返信
Adesignl
トップ投稿者 | Solutions Partner
トップ投稿者 | Solutions Partner

Filter Sidebar

解決

The way you are filtering by type could be used top  filter by category as well. You would jiust have to check against both at the same time. 

 

This is a great and fast way to do it if there is not to many items. but if you have a larger selection it is better to use ajax.

 

Here is a doc with the javascript connectors info.

 

https://docs.google.com/document/d/e/2PACX-1vTuu12oFF4bQY1zVD2-WKFuM2dEDN81-fZRV1tGaCL5Z_OcjC-B6O3mH...

cbarley
解決策
元HubSpot社員
元HubSpot社員

Filter Sidebar

解決

Hi @MaximSiebert , do you have access to HubDB? If so, I'd say this would be quite easy to set up without the browser having to render all items, and hide them with CSS. 

 

This article (https://designers.hubspot.com/docs/tutorials/how-to-build-a-real-estate-listing-with-hubdb) has a really great example of filtering capabilities with HubDB. 

 

Your CSS/Jquery solution is definitely okay too, as long as the number of items doesn't get too large, and you don't have to render out a ton of things to the DOM initially

0 いいね!
MaximSiebert
メンバー | Solutions Partner
メンバー | Solutions Partner

Filter Sidebar

解決

I ended up going with my CSS/jQuery solution for now, but I do agree - once the number of items gets a little too large I'll have to look into the HubDB solution you shared!