Feature Request: Order Article Attachments

13 Commentaires

  • Kristina Tibbitts

    This would be extremely helpful!

    0
  • Yoshiko Matsuo

    I request the same feature

    0
  • Conny Svanberg

    Exactly what I am looking for right now...

    0
  • 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...

    1
  • Holly Jania

    We would like this as well!

    1
  • 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) {
    frag.appendChild(item);
    }
    list.appendChild(frag);
    }

    reorder()

    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.

    0
  • Conny Svanberg

    Thanks a lot, Christophe!

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

    0
  • 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?

    0
  • 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. 

    0
  • 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. 

    1
  • Adam Chang

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

    0
  • 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.  

    0
  • Katarzyna Karpinska
    Zendesk Product Manager

    Hi All, 
    Thank you for all your valuable suggestions. Recently, we've made several enhancements to our article attachments functionality (especially their management in the Media library).

    However, we regret to inform you that a specific feature request related to article attachments is beyond our current development scope. Given our current roadmap, we won't be able to address this request in the next quarter or two.

    We understand this may not be the news you were hoping for. I want you to know that your request has been noted for future consideration.

    1

Vous devez vous connecter pour laisser un commentaire.

Réalisé par Zendesk