Hi,
I’m working with a client who previously had facets for several of their verticals, but the facets have disappeared.
I’m currently working on the Advisors vertical, and I’ve enabled facets per the Help Guide (screenshot below). But when I run a search in the Answers experience, no facets are showing up on the side. Is there something else I need to configure for facets to show up?
Hey Harris,
You will also have to go into the frontend and make some changes to both the config file as well as the handlebars file for each vertical you want facets enabled for. Specifically, there is Facets component to set up in the config file and some some partials you will have to comment in on the handlebars file. All of the details are explained here!
Best,
DJ
Hi DJ,
Thanks for linking that module!
I added Facets to the Advisor.json file, and also to the template.hbs file for Advisors, but I’m still not seeing facets displayed on the Answers experience. Was this the right place to add this information?
Hi Harris,
The two files you’ll need to edit are the json file for the vertical, found within the “config” folder and the handlebars file found within the “pages” folder. On the handlebars file, you’ll need to comment in all of the lines that are specified in the document I linked out to in my last response.
One thing to note is that your screenshot is showing that you are currently in the template.hbs file for the advisor card, not the handlebars file for the vertical itself. The Facets code should exist in the vertical template as described in the link from my last response, not the files for the card.
If that last screenshot showing the Facet component is in the component.json file for the card, that is why it is not working; that code should not exist in the card’s files. If that is indeed the Advisor.json file, which is the correct file, I can see that “Facets” is underlined in red which is indicating that there is a syntax error within the file. That error is most likely preventing the component from being rendered correctly. This may be due to a missing comma right before the Facets component. If you hover over the red underlining, the Code Editor should provide some sort of guidance around the cause of the syntax error.
Once all of this has addressed and you’ve commented in all of the lines in the handlebars file for the vertical, not the card, it should render as expected!
Best,
DJ
1 Like
Hi DJ,
Thank you for explaining that!
I removed the lines from the handlebars file in the card folder, and added it to the handlebars file in the Pages file.
I’ve attached screenshots of what I’ve done for the Advisors.html.hbs file and Advisors.json file.
Based on the HH module, this seems correct, but I’m not seeing it in the Answers Experience. Is there something I’m still missing?
Harris,
Looks like some small syntax errors in your handlebars files were causing the issues. For example, the --}}
on line 41 of the Advisors.html.hbs
file. With those syntax errors fixed, the facets are showing as expected!
Best,
DJ
1 Like