How do you create Dropdown Menus in a Zendesk Knowledge Center?

7 Kommentare

  • Kirsten Flores

    Hi Danielle, 

    I haven't tried this with sections, but this is how my team creates drop-downs for the table of contents in long articles. 

    In the stylesheet (style.css), you have to add the formatting for the drop down. This is what we added:

    /* ====== Article Table of Contents ====== */
    #toc{
    cursor: pointer;
    }
    #toc:after{
    content:'\f13a';
    font-family: "Font Awesome 5 Pro";
    vertical-align: middle;
    margin-left:1rem;
    transition: all .6s;
    display: inline-block
    }
    #toc.open:after{
    transform: rotate(180deg);
    }
    #toc-list{
    display: block;
    }

    Then, to add the table of contents drop-down within an article:

    1. Go into the article's code editor by clicking the code editor icon.
    2. In the H1 tag, edit to read <h1 id="toc">.
    3. In the following ul tag, edit to read <ul id="toc-list">.
    4. Click OK and then save the article. 
    5. Test the drop-down in the article. 

     

    I would think you could do something similar with sections as well by defining it a bit differently, but I haven't tried that. Hope that is helpful! 

    0
  • Kirsten Flores

    Here's an example of how it works in action: https://support.alertlogic.com/hc/en-us/articles/115002093867 

    0
  • Jamey Pringle

    Kristen,

     

    Your example shows what it looks like but now how to create the drop downs.

    0
  • Kirsten Flores

    Jamey Pringle - I actually have another comment with how I did it, but it looks like since I included images, it is "pending approval". So hopefully it will get posted soon!

     

    0
  • Brett - Community Manager
    Zendesk Community Team

    Hey Kirsten,

    Thanks for taking the time to share how you accomplished the above! I checked out moderation queue but I wasn't able to track down a pending comment from you. Are you still seeing this on your end? Any chance you could try to repost?

    Apologies for the inconvenience there!

    0
  • Kirsten Flores

    It looks like it has posted now. You are able to see a detailed comment from me with the steps on how I performed this using the style sheet and the code editor within an article, correct?

    0
  • Brett - Community Manager
    Zendesk Community Team

    Hey Kirsten,

    Thanks! I do see what one :). I wasn't sure if there was another I missed so appreciate the clarification!

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.

Powered by Zendesk