setHelpHubFilter(filter)
Set the HelpHub to only include articles with matching labels/tags. This filter applies to both HelpHub and Copilot.
Currently only supported for Zendesk labels and Wordpress tags.
Examples
Include articles with Article and Video labels
const labels = ["Article", "Video"];
window.CommandBar.setHelpHubFilter({ labels: labels });
Match articles according to a user's feature set
if (!user.isPaid) {
window.CommandBar.setHelpHubFilter({ labels: ["Free"]; });
} else (
window.CommandBar.setHelpHubFilter({ labels: ["Free", "Professional"]; });
)
Method parameters
filter
object
Filter to apply
Property | Type | Description |
---|---|---|
labels | string[] | List of labels. Any articles tagged with matching labels will be displayed in HelpHub and all others will be excluded. |