Array of ALL Articles in a Section on Home Page
AnsweredDue to the limitation of not having another sub-section within sections, I am creating a menu on the Home Page that looks exactly like this:
https://support.canva.com/
However, there is one major issue I cannot figure out. The menu is designed to auto-populate articles into the correct section of the menu based off of it's tag (or label), but the array of articles that I'm given for each section on the Home Page is only like 6 articles.
Is there a way to get an array of ALL articles within a section from the Home Page template? I find it silly that this limitation exists. You can access categories -> sections -> articles from the home page, but no where in the documentation does it say that this array of articles is limited to such a small number. I'm sure this is for a reason, pagination I'm guessing, but it's incredibly limiting and I'm honestly not the best with JavaScript, so I'm not sure how to use APIs or scripts to create an array myself.
Any suggestions would be greatly appreciated!
-
Hey Taylor -
It requires some custom code, but here are this Community tip should point you in the right direction:
List all articles for each section(s) on the same category page
-
Hi Nicole,
Thank you for that information, but I have already read through this article before and it didn't help me enough to figure out how to do this task from the Home Page. Unfortunately, I'm not the best at JavaScript so it's hard for me pick out the useful code in that article.
I was just hoping another developer might have done this before and could share their solution since I'm sure many people want to know how to do this from the Home Page without relying on URLs or clicking links. It just seems like Zendesk should seriously have a way for developers to grab all articles in a section. Do you know if this is something that is suggested as an update anywhere? I would be happy to add my vote to that list if it exists.
Thanks!
-
Hey Taylor -
I'll check to see if there's a thread in Product Feedback and will get back to you on that. We'll also ping the Community Moderators; several of them are great at these customizations and hopefully one of them will have a suggestion for you. Standby!
-
Thank you Nicole! That would be truly helpful if anyone had done something like this before. If they need anymore information, the basic task is to display articles in the menu based off of their labels. maybe there is an easier way to do this than by populating an array of articles per section, so any ideas are appreciated!
Please sign in to leave a comment.
5 Comments