How do you customize the "Search Module" results - editing the script?

cstone
HubSpot Employee
HubSpot Employee

HubSpot hosted our first ever CMS Developer AMA on July 25th 2018. This question was submitted and the first reply is what the panelist and audience chat responded with. (view the full AMA here)

--------------------------------------------

Could you show us some ways to play with the new "Search Results" module? Particularly, I am interested in ways to edit the script.

For example, how can I set a character limit for the result.title and result.description? (Screenshot attached) I used to rely on HubL's "trucatehtml" filter but it doesn't apply to this as the result are retrieved with JS. Any other JS trick to this module would be greatly helpful Smiley Happy


Join us on March 27th at 12 PM for the Digital Essentials Lab, an interactive session designed to redefine your digital strategy!
Engage with expert Jourdan Guyton to gain actionable insights, participate in live Q&A, and learn strategies to boost your business success.
Don't miss this opportunity to connect and grow—reserve your spot today!

1 Accepted solution
cstone
Solution
HubSpot Employee
HubSpot Employee


Join us on March 27th at 12 PM for the Digital Essentials Lab, an interactive session designed to redefine your digital strategy!
Engage with expert Jourdan Guyton to gain actionable insights, participate in live Q&A, and learn strategies to boost your business success.
Don't miss this opportunity to connect and grow—reserve your spot today!

View solution in original post

5 Replies 5
cstone
Solution
HubSpot Employee
HubSpot Employee


Join us on March 27th at 12 PM for the Digital Essentials Lab, an interactive session designed to redefine your digital strategy!
Engage with expert Jourdan Guyton to gain actionable insights, participate in live Q&A, and learn strategies to boost your business success.
Don't miss this opportunity to connect and grow—reserve your spot today!

henryd1
Member

Hey @cstone, thanks for sharing but it seems that the media was removed. Any clue where I can get some information on how to truncate search results in HS search results module?

 

Cheers!

0 Upvotes
Jsum
Key Advisor

@cstone Where do you find these video sessions?

0 Upvotes
jausura
HubSpot Employee
HubSpot Employee

Hey @Jsum, those vids are snippets from the developer AMA on 7/25. The entire session can be found here. If you want to peruse the snippets by question, @cstone posted each of those in Community, so his last few posts are a good synopsis. Does that answer the question? Let me know if I misinterpreted... 

Jsum
Key Advisor

@jausura that is great, thanks. I didn't know this type of content was out there, I'm glad it was shared.

0 Upvotes