List all articles for each section(s) on the same category page

49 Commentaires

  • Keith Raucy

    Getting an error of:

    Cannot read property 'split' of undefined

    0
  • Vlad
    Community Moderator
    The Wise One - 2022

    Very great tip and it works, thanks Diziana! I just have to adapt this row additionally:

    $(e.target).parent().find('ul.article-list').html(_arthtml);

    to some thing like this

     $(e.target).parent().html(_arthtml);
    0
  • Jessie Schutz
    Zendesk Customer Care

    Thanks for sharing your adaptation, Vladan. :)

    0
  • Mary Haberle

    This was very helpful--for future reference I wanted to share that, in my sandbox, the section title disappeared when the user clicked on "See all articles" and the full list popped up. But, once we implemented in our active help center, this problem disappeared and the section titles remained visible.

    0
  • Hiroko Kanazawa

    These help me a lot! Also I want to know how to open the category page like the last image Diziana shows originally when I open the category page. "Originally" means without clicking any "see all articles".

    0
  • Nicholas Orr

    Hi all,

    Does anyone know if there's a way to remove the "See all x articles" option completely, on all pages? So even in main page, where it's showing the individual sections, and some get cut off and some don't, I'd like to be able to always have those showing all articles.

    Any ideas?

    Cheers,

    Nick

    0
  • Vlad
    Community Moderator
    The Wise One - 2022

    Hi Nicholas, if you are on Copenhagen theme, this code should do that. Just add it at the bottom of your CSS file:

    .see-all-articles {
    display: none;
    }

    Let us know the result ;)

    0
  • Nicholas Orr

    Vladan,

     

    Thanks, but that just hides the links, so you can't get to all the articles.  I want to to always expand to show all articles, regardless of how many are in a section.

     

    Thanks,

    Nick 

    0
  • Nicholas Orr

    Vladan,

    Also, I'm on the older swiftest elk theme.

    Thanks,

    Nick

    0
  • Vlad
    Community Moderator
    The Wise One - 2022

    Ahh sorry, I didn’t understand what you meant.

    That can be achieved with a help of Zendesk API but it would require much more coding. If you have a front-end developer on your side, this link will be helpful for him:
    https://developer.zendesk.com/rest_api/docs/help_center/articles#list-articles

    Hope this helps.

     

     

     

    0
  • Trapta Singh
    Community Moderator

    Hi @Nicholas,

    Please refer to this post - https://support.zendesk.com/hc/en-us/community/posts/203458986-Show-less-than-6-articles-in-Guide?page=5#community_comment_360000010847

    Thanks

    Team Diziana

    0
  • Randy Schreck

    I changed the two lines like this:

    _arthtml = _arthtml + '<li class="'+(itm.promoted==true?'article-promoted':'')+'">

    to

    _arthtml = _arthtml + '<li class="article-list-item'+(itm.promoted==true?' article-promoted':'')+'">

    so that the default CSS formating would remain. Note the "space" before "article-promoted;" it's required for the code to be read correctly.

    We don't have any promoted articles yet, so I'm crossing my fingers nothing is broken, but it works very well so far. Thanks Diziana for the original code!

    0
  • Trapta Singh
    Community Moderator

    @Randy Schreck,

    Thanks for coming back and sharing your code. Glad that you liked it.

    Enjoy :)

    Team Diziana

    0
  • Yeny Rubiano

    Hello ZenDesk Support Team,

    Is there a way to list only one specific Section on home page and a list of the articles within that section?

    0
  • Jessie Schutz
    Zendesk Customer Care

    Hi Yeny!

    You should be able to hide or display just about anything with custom code. Can you give me more detail about what you're trying to accomplish here? We might have some community tips that will help you with you're working on.

    0
  • Yeny Rubiano

    Hello Jessie, thanks for your prompt reply.

    I was able to pull up all sections on my home page using {{#each categories}} {{#each sections}} tokens and I used CSS to hide the ones I don't need by using their custom IDs.

    0
  • Nicole Saunders
    Zendesk Community Manager

    Hi Yeny -

    If I'm reading this correctly, it sounds like you got things all sorted. But do let us know if there are additional questions we can answer for you!

    0
  • Jeremy Tellier

    I am looking to do this too, I would like it to show all the articles without needing to click a link. Is there a way to turn off the 6 article limit all together.

    0
  • Trapta Singh
    Community Moderator

    Hi Jeremy,

    You can increase the count of articles to 30. Please take a look at this post: https://support.zendesk.com/hc/en-us/community/posts/203458986-Show-less-than-6-articles-in-Guide?page=5#community_comment_360000010847

    You need to update the UI to update the look and feel of the list on the homepage.

    Let me know if this solves your issue.

    Team Diziana

    0
  • Jeremy Tellier

    I did this little hack... I had to add a see-all-articles div because that was not in there by default but then just adding something like this loaded them and if it happens too soon I at least get a button that works like you show

    setTimeout(function() {
       $('.see-all-articles').click();
    }, 100);

    0
  • Dominic Eves

    Hi,

    Is it possible to have all the articles showing on load without needing to press 'sell all'?

    https://outdoorandcountry.zendesk.com/hc/en-us/categories/360000141698--Our-Retail-Stores

    I want to view them all there without pressing see all. So onload they're all displayed without going to another page?

    Of if that's not possible is there a work around I could use?

    Thanks,

    0
  • Brett Bowser
    Zendesk Community Manager

    Hey Dominic,

    I recommend taking a look at the following Community Tip posted by Diziani which goes over setting this up in your Help Center: List all articles for each section(s) on the same category page

    Hope this helps!

    0
  • Dominic Eves

    Hi,

    That links back to this post. I want to do it without having to press see all, so on page load, it just shows them there.

    Thanks,

    0
  • Brett Bowser
    Zendesk Community Manager

    My mistake Dominic! Had too many windows open in my browser at the time of this post :(

    Hopefully someone from Diziana can reply back and offer up some guidance on how to accomplish what you're looking for.

    Cheers!

    0
  • Trapta Singh
    Community Moderator

    @Dominic,

    Please refer to this comment: https://support.zendesk.com/hc/en-us/community/posts/203458986-Show-less-than-6-articles-in-Guide?page=5#community_comment_360000010847

    Let me know if this solves your issue.

    Team Diziana

    0
  • Hedda Klintskog

    Hi!

    I'm also trying to display all sections on the category page, but I'm using another solution. I'm also displaying the articles with the API but I have problem with internal articles. I can se the internal articles even  as an end user when the articles are displayed by the API request. Have anyone else had the sam problem?

     

    Best regards

    0
  • Vlad
    Community Moderator
    The Wise One - 2022

    hmm, they shouldn't be there for end-users. Are you using Preview mode? 

    If yes, can you try with a real end-user account? 

     

    0
  • Hedda Klintskog

    Hi! I've tried as an end user in both preview mode and when the account is activated. When I display the articles by using the API I don't know how to determine whether they are internal or not. I've tried with "{{#if internal}}", but it was false for all the articles, even the internal ones.

     

    0
  • Hedda Klintskog

    I think I solved it, I can use "user_segment_id" to check if the article can be viewed by everyone or not.

     

    Best regards

     

     

    0
  • Nicole Saunders
    Zendesk Community Manager

    Thanks for coming back and letting us know that you got that sorted out and for sharing the solution, Hedda!

    0

Vous devez vous connecter pour laisser un commentaire.

Réalisé par Zendesk