Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Paginated results in CRM Portal

(0) ShareShare
ReportReport
Posted on by

Hi,

I am using the out of the box "Most Recent Articles" and I'm wondering if how to use pagination for this one once it reached more than 10 results. 

Thank you,

rome

*This post is locked for comments

  • Verified answer
    Dmytro Rutkovskyi Profile Picture
    1,835 on at
    RE: Paginated results in CRM Portal

    Hi Rome,

    It looks like you are happy what OOB Portal propose you but you just want longer list with Paging.

    You can easily achieve it with basic Javascript:
    Go to Portals->WebTemplates->Knowledge Management - Most Recent Articles and edit it.
    I used first-found simple pagination on GitHub here

    You should definitely modify this customization, but you can start with something like (highlighted changed places from OOB):

    {% assign count = 30 %}
    {% assign languagecode = website.selected_language.code %}
    <script src="cdn.rawgit.com/.../jquery.easyPaginate.js" ></script>
    <style>
    #easyPaginate a {display:block;margin-bottom:5px;}
    .easyPaginateNav a {padding:5px;}
    .easyPaginateNav a.current {font-weight:bold;text-decoration:underline;}
    </style>
    
    <div class="panel panel-default">
      <div class="panel-heading">
        <div class="panel-title">{% editable snippets 'KnowledgeMgmt/MostRecentArticles' type: 'text', default: resx['KnowledgeMgmt_Most_Recent_Articles'], escape: true, tag: 'span' %}</div>
      </div>
      {% assign recent_articles = knowledge.articles | recent: count,languagecode  %}
      {% if recent_articles %}
        <div class="list-group" id="easyPaginate">
        {% for article in recent_articles %}
          <a class="list-group-item" href="{{ article.url | escape }}"><div class="pull-right text-muted small" style="margin-left: 5px;">{{ article.modifiedon | date: 'MMM d, yyyy' | escape }}</div>{{ article.title | escape }}</a>
        {% endfor %}
        </div>
      {% endif %}
      
      <script type="text/javascript">
      $(function() { 
        $('#easyPaginate').easyPaginate({
          paginateElement: 'a',
           elementsPerPage: 5
         });
       });
      
      </script>
    </div>


    Which gives you a list of 30 last articles on 6 or fewer pages:
    most_5F00_recent_5F00_paging.JPG

  • Community Member Profile Picture
    on at
    RE: Paginated results in CRM Portal

    I want to use the Entity List but it won't let me filter the results by content access level. I'm  "entity listing" Knowledge Articles.

  • Suggested answer
    Justinjose Profile Picture
    2,707 on at
    RE: Paginated results in CRM Portal

    Hi Rome,

    Entity List come with pagination and if you want to customize entity list then you should add pagination manually. follow below link for an example. Page Size you can set in Entity list

    docs.microsoft.com/.../render-entity-list-current-page

    Thanks

    Justin Jose

  • Aric Levin - MVP Profile Picture
    30,188 Moderator on at
    RE: Paginated results in CRM Portal

    You can use an Entity List to display the results, and set the page size. This will automatically have paging for you.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
Victor Onyebuchi Profile Picture

Victor Onyebuchi 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans