Skip to main content

Notifications

Announcements

No record found.

Service | Customer Service, Contact Center, Fie...
Answered

Sort the displayed category in Knowledge Base home page alphabetically based on title

(0) ShareShare
ReportReport
Posted on by

Is there any way we can sort the displayed categories on Knowledge base home alphabetically?

Current Code to display categories:

<div class="list-group unstyled">
{% for category in categories %}
<a href="{{ category_url | add_query: 'id', category.categorynumber }}" class="list-group-item">
{{ category.title }}
</a>
{% endfor %}
</div>
  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Sort the displayed category in Knowledge Base home page alphabetically based on title

    Hi Partner,

    Has the problem been solved? Any updates?

    Please click Yes under "Did this answer your question?" to close this thread.

     Image

    Thanks. 

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Sort the displayed category in Knowledge Base home page alphabetically based on title

    Hi Pratiksha,

    You can use order_by liquid filter:

    Returns the elements of an array ordered by a given attribute of the elements of the array.
    Optionally, you can provide desc as a second parameter to sort the elements in descending order, rather than ascending.

    https://docs.microsoft.com/en-us/powerapps/maker/portals/liquid/liquid-filters#order_by  

    Go portal Management >  Web Template > Knowledge Base - Home to add following code:pastedimage1632217337122v2.png

    Test Result:

    pastedimage1632217586215v3.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,431 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,503 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans