web
You’re offline. This is a read only version of the page.
close
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

I have the same question (0)
  • Aric Levin - MVP Profile Picture
    30,190 Moderator on at

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

  • Suggested answer
    Justinjose Profile Picture
    2,707 on at

    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

  • Community Member Profile Picture
    on at

    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.

  • Verified answer
    Dmytro Rutkovskyi Profile Picture
    1,835 on at

    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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans