web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
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 Microsoft Employee

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>
  • Verified answer
    Community Member Profile Picture
    on at

    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

  • Community Member Profile Picture
    on at

    Hi Partner,

    Has the problem been solved? Any updates?

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

     Image

    Thanks. 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
11manish Profile Picture

11manish 48 Super User 2026 Season 2

#2
Travis South Profile Picture

Travis South 45

#3
Ayesha Wajahat Profile Picture

Ayesha Wajahat 18

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans