Feature Request: Order Article Attachments

12 コメント

  • Kristina Tibbitts

    This would be extremely helpful!

  • Yoshiko Matsuo

    I request the same feature

  • Conny Svanberg

    Exactly what I am looking for right now...

  • Adam

    Came here looking for this exact same thing.  Weirdly they are organised when I edit the article, by name, which is fine since we use version numbers, but on the article that is published they appear random...

  • Holly Jania

    We would like this as well!

  • Christophe Tiraboschi
    Zendesk Customer Care

    Hi Everyone,

    As a workaround, here is a piece of Javascript to order attachements by alphabetical order on the front-end of an article:

    const reorder = () => {
    const frag = document.createDocumentFragment();
    const list = document.querySelector(".attachments");
    const items = list.querySelectorAll("li");
    const sortedList = [...items].sort((a, b) => {
    const c = a.textContent,
    d = b.textContent;
    return c < d ? -1 : c > d ? 1 : 0;
    for (const item of sortedList) {


    You can use this code in the script.js file of your theme, ideally just before the last closing bracket.

    If you have a custom theme, please double check that the <ul> tag listing the attachements has still the class "attachements". You can find it in the article_page.hbs file at the line 96 in the default theme (see screenshot attached). If the name of the class was changed, you would need to adjust the third line of the snippet provided above by replacing "attachements" with the new class name.

  • Conny Svanberg

    Thanks a lot, Christophe!

    Made my life a lot more easy to live... :-)

  • Adam

    Hi Christophe Tiraboschi,

    Thanks for this, I have tried adding this as it has been very frustrating not having it, however it has not changed the article, they are still ordered incorrectly.  Please advise what I can check?  Using the default Copenhagen theme.  This is the bottom of my script.js.

    And this is my article page where you will see they are still in a different order (ive blocked the first part of the filename, but it is identical), the only difference is the version number at the end, im wondering does your workaround apply to numbers also?

  • Laura Benison

    hi Christophe Tiraboschi

    thank you for sending this but for my particular role, it would really be helpful to be able to manually re-order the articles in order of importance. right now, when we receive a new version of an important document that should be listed at the top of the documents section, i have to delete all the documents and then re-upload the document in the order of importance. 

  • Katarzyna Karpinska
    Zendesk Product Manager

    Hi All, 

    Thank you for your comments and feedback. It's highly appreciated, especially since we are planning to spend some time in the next two quarters bringing some improvements into the area of article attachment management. 

  • Adam Chang

    If  we can sort the uploaded files created time descending, that would be great.

  • Caroline Scott

    This is also a must for us, because of the way attachments are shown on articles now they are part of the article, so even if I add a list of items with links to the attachments I am basically duplicating the attachments which looks ridiculous. I am sure not that long ago I was able to add the attachments in the correct order and they would show in the order they were added, now they are just jumbled in no particular order.  



Powered by Zendesk