Invalid reference (categories)
I'm trying to put the categories links on any page, but it works only on Home Page.
If I use {{categories}}, I got invalid reference and it does not work.
-
Hi @Rian,
Zendesk provides this component ( {{categories}} ) only on the homepage.
So if you are using it on a homepage, use it with "each". Something like this -
{{#each categories}} {{/each}}
as it is an array of categories you have to iterate it.
If you are on category template, this component ( {{categories}} ) will not work. You have to use something like this -
{{category.name}}
and it will provide you details about the current category.
To know more about it, please refer to the documentation about homepage and category template.
Let me know if you need face any issue.
Team Diziana
-
Not all properties are available in all parts of Guide; you can see what's available where, here: https://developer.zendesk.com/apps/docs/help-center-templates/introduction
-
Ok, but how would be the solution?
I could do it using JSON, but it is not pratical at all.
-
@Rian,
If you are doing it using JSON, then you can use localStorage to persist your data.
Please sign in to leave a comment.
4 Comments