Search with a Collection

Comments

3 comments

  • Official comment
    Avatar
    K15t Team

    Hi Dan,

    We have collected some development recipes in our help article Search Template Recipe. There you can see how you can configure your search in such a way that results from various spaces (e.g. the spaces that are part of your collection) are shown. 

    I hope this is helpful!

    Cheers,

    Laura

    Comment actions Permalink
  • Avatar
    Dan Taube

    Hi Laura,

    Thank you for your response. We are aware of the documentation side and recipes, but they did not provide enough to arrive at what we need. However, upon further review of the Help Center viewport, I worked out what would be necessary based on what it is doing.

    In short, it looks like the Help Center theme likely has the necessary code in the Apache Velocity template to dynamically build the search form with the space designations that reflect members of the collection. Then, in the JS for the search logic, I found that you are using the presence of those space inputs to craft the CQL value that will be used in the eventual search URL.

    Simple enough to know, but would require a bit of development to reproduce the JS correctly. If we go that route, I'll look to sharing in the developers community in Google Groups.

    Dan

    0
    Comment actions Permalink
  • Avatar
    K15t Team

    Hi Dan,

    Sorry for misunderstanding that part of your requirements. You are right, the Help Center Theme already handles this to automatically include all members of a collection in the search. You can definitely use the implementation there as a basis for your custom theme (you might not need all of its complexity as it's also built to respect Scroll versions and Scroll Translations). 

    Of course, you're also more than welcome to share your full solution in the Google Group. I'm sure other users with custom themes will appreciate your help. We certainly do!

    Cheers,

    Laura

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk