Hi Team! In my Answers build the link on a direct answer for “what’s my routing number?” isn’t working. Could this be because the displayed answer is already showing the entire answer in the KG or because there is not a “Website URL” field for that FAQ? I’d like to either remove the “Read more about…” line from all of my direct answer featured snippets or have it null check if there is a link before displaying the line. Any suggestions on this would be appreciated!
Hey Carolyn,
I think you have the right idea with adding a null check to the card! To do so, you can use the “Override Theme” command and navigate to directanswercards
> documentsearch-standard
to fork the default Featured Snippet card.
Once you do so, you can add a null check to the link’s data mapping:
viewDetailsLink: viewDetailsUrl ? Formatter.getUrlWithTextHighlight(snippet, viewDetailsUrl) : null
Best,
DJ
Hi Carolyn,
Following up here - we’ve added this null check for the Direct Answers documentsearch-standard with Theme 1.26.
If this was the only change you made to the forked card, you can upgrade your theme and use the built-in theme card to get the fix (this will ensure you get future theme updates to this card!). If you want to keep your forked card, then you can remove the null check above and if you forked formatters-internal.js
, you should refresh the getUrlWithTextHighlight
formatter to the latest version.