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 Microsoft Employee

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
    Dmytro Rutkovskyi 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
    Community Member Microsoft Employee 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
    Justinjose 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 Profile Picture
    Aric Levin 30,188 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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,489 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans