<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Limiting the number of documents shown on a DocLib page in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/limiting-the-number-of-documents-shown-on-a-doclib-page/m-p/40167#M16845</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Alfresco 5.2, if you want to config number of items per page in Document Library, the steps are the following:&lt;/P&gt;&lt;P&gt;1.- Copy the file "documentlist-v2.get.js" to "{Alfresco}\tomcat\shared\classes\alfresco\web-extension\site-webscripts\org\alfresco\components\documentlibrary"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.- In this file we have to add the following line:&lt;BR /&gt;model.widgets[1].options.pageSize = 10;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.- We will add this line at the end of the code of widgets function:&lt;/P&gt;&lt;P&gt;function widgets()&lt;BR /&gt;{&lt;BR /&gt; var useTitle = "true";&lt;BR /&gt; var docLibConfig = config.scoped["DocumentLibrary"];&lt;BR /&gt; if (docLibConfig != null)&lt;BR /&gt; {&lt;BR /&gt; var tmp = docLibConfig["use-title"];&lt;BR /&gt; useTitle = tmp != null ? tmp : "true";&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;var docListToolbar = {&lt;BR /&gt; id: "DocListToolbar", &lt;BR /&gt; name: "Alfresco.DocListToolbar",&lt;BR /&gt; assignTo: "docListToolbar",&lt;BR /&gt; options: {&lt;BR /&gt; siteId: (page.url.templateArgs.site != null) ? page.url.templateArgs.site : "",&lt;BR /&gt; rootNode: toolbar.rootNode != null ? toolbar.rootNode : "",&lt;BR /&gt; repositoryRoot: toolbar.rootNode,&lt;BR /&gt; hideNavBar: Boolean(toolbar.preferences.hideNavBar),&lt;BR /&gt; repositoryBrowsing: toolbar.rootNode != null,&lt;BR /&gt; useTitle: (useTitle == "true"),&lt;BR /&gt; syncMode: toolbar.syncMode != null ? toolbar.syncMode : "",&lt;BR /&gt; createContentByTemplateEnabled: model.createContentByTemplateEnabled,&lt;BR /&gt; createContentActions: model.createContent&lt;BR /&gt; }&lt;BR /&gt; };&lt;BR /&gt; &lt;BR /&gt; var documentList = {&lt;BR /&gt; id : "DocumentList", &lt;BR /&gt; name : "Alfresco.DocumentList",&lt;BR /&gt; options : {&lt;BR /&gt; syncMode : model.syncMode != null ? model.syncMode : "", &lt;BR /&gt; siteId : (page.url.templateArgs.site != null) ? page.url.templateArgs.site : "",&lt;BR /&gt; containerId : template.properties.container != null ? template.properties.container : "documentLibrary",&lt;BR /&gt; rootNode : model.rootNode != null ? model.rootNode : "null",&lt;BR /&gt; repositoryRoot : model.rootNode,&lt;BR /&gt; usePagination : (args.pagination == "true"),&lt;BR /&gt; sortAscending : (model.preferences.sortAscending != null ? model.preferences.sortAscending : true),&lt;BR /&gt; sortField : model.preferences.sortField != null ? model.preferences.sortField : "cm:name",&lt;BR /&gt; showFolders : (model.preferences.showFolders != null ? model.preferences.showFolders : true),&lt;BR /&gt; hideNavBar: (model.preferences.hideNavBar != null ? model.preferences.hideNavBar : false),&lt;BR /&gt; simpleView : model.preferences.simpleView != null ? model.preferences.simpleView : "null",&lt;BR /&gt; viewRenderers: model.viewRenderers,&lt;BR /&gt; viewRendererName : model.preferences.viewRendererName != null ? model.preferences.viewRendererName : "detailed",&lt;BR /&gt; viewRendererNames : model.viewRendererNames != null ? model.viewRendererNames : ["simple", "detailed", "gallery", "filmstrip"],&lt;BR /&gt; highlightFile : page.url.args["file"] != null ? page.url.args["file"] : "",&lt;BR /&gt; replicationUrlMapping : model.replicationUrlMapping != null ? model.replicationUrlMapping : "{}",&lt;BR /&gt; repositoryBrowsing : model.rootNode != null, &lt;BR /&gt; useTitle : (model.useTitle != null ? model.useTitle == "true" : true),&lt;BR /&gt; userIsSiteManager : model.userIsSiteManager,&lt;BR /&gt; associatedToolbar: { _alfValue: "docListToolbar", _alfType: "REFERENCE" },&lt;BR /&gt; commonComponentStyle : model.commonComponentStyle,&lt;BR /&gt; suppressComponent : model.suppressComponent,&lt;BR /&gt; filmstripImageLazyLoading: model.filmstripImageLazyLoading == "true"&lt;BR /&gt; }&lt;BR /&gt; };&lt;BR /&gt; if (model.repositoryUrl != null)&lt;BR /&gt; {&lt;BR /&gt; documentList.options.repositoryUrl = model.repositoryUrl;&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; model.widgets = [docListToolbar, documentList];&lt;BR /&gt; &lt;STRONG&gt;model.widgets[1].options.pageSize = 10;&lt;/STRONG&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.- In this case we have establish ten items per page&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.- We must restart Alfresco Service and after that this configuration will be available&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="14365" alt="Items per page" class="image-1 jive-image j-img-original" src="https://connect.hyland.com/legacyfs/online/alfresco/14365_elementos_por_pagina.jpg" style="width: 620px; height: 494px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Jun 2017 09:37:36 GMT</pubDate>
    <dc:creator>calvo</dc:creator>
    <dc:date>2017-06-14T09:37:36Z</dc:date>
    <item>
      <title>Limiting the number of documents shown on a DocLib page</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/limiting-the-number-of-documents-shown-on-a-doclib-page/m-p/40164#M16842</link>
      <description>Is there a way to limit the number of documents shown on a Document Library page?</description>
      <pubDate>Tue, 13 Jun 2017 08:05:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/limiting-the-number-of-documents-shown-on-a-doclib-page/m-p/40164#M16842</guid>
      <dc:creator>zputnoky</dc:creator>
      <dc:date>2017-06-13T08:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting the number of documents shown on a DocLib page</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/limiting-the-number-of-documents-shown-on-a-doclib-page/m-p/40165#M16843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please use the search for "pageSize" this topic has been covered many times&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jun 2017 08:31:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/limiting-the-number-of-documents-shown-on-a-doclib-page/m-p/40165#M16843</guid>
      <dc:creator>mrks_js1</dc:creator>
      <dc:date>2017-06-13T08:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting the number of documents shown on a DocLib page</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/limiting-the-number-of-documents-shown-on-a-doclib-page/m-p/40166#M16844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After checking/modifying dozens of files, the solution is to modify the ./tomcat/webapps/share/components/documentlibrary/documentlist-min.js file. Might not be the ultimate solution but it works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jun 2017 11:24:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/limiting-the-number-of-documents-shown-on-a-doclib-page/m-p/40166#M16844</guid>
      <dc:creator>zputnoky</dc:creator>
      <dc:date>2017-06-13T11:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting the number of documents shown on a DocLib page</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/limiting-the-number-of-documents-shown-on-a-doclib-page/m-p/40167#M16845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Alfresco 5.2, if you want to config number of items per page in Document Library, the steps are the following:&lt;/P&gt;&lt;P&gt;1.- Copy the file "documentlist-v2.get.js" to "{Alfresco}\tomcat\shared\classes\alfresco\web-extension\site-webscripts\org\alfresco\components\documentlibrary"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.- In this file we have to add the following line:&lt;BR /&gt;model.widgets[1].options.pageSize = 10;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.- We will add this line at the end of the code of widgets function:&lt;/P&gt;&lt;P&gt;function widgets()&lt;BR /&gt;{&lt;BR /&gt; var useTitle = "true";&lt;BR /&gt; var docLibConfig = config.scoped["DocumentLibrary"];&lt;BR /&gt; if (docLibConfig != null)&lt;BR /&gt; {&lt;BR /&gt; var tmp = docLibConfig["use-title"];&lt;BR /&gt; useTitle = tmp != null ? tmp : "true";&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;var docListToolbar = {&lt;BR /&gt; id: "DocListToolbar", &lt;BR /&gt; name: "Alfresco.DocListToolbar",&lt;BR /&gt; assignTo: "docListToolbar",&lt;BR /&gt; options: {&lt;BR /&gt; siteId: (page.url.templateArgs.site != null) ? page.url.templateArgs.site : "",&lt;BR /&gt; rootNode: toolbar.rootNode != null ? toolbar.rootNode : "",&lt;BR /&gt; repositoryRoot: toolbar.rootNode,&lt;BR /&gt; hideNavBar: Boolean(toolbar.preferences.hideNavBar),&lt;BR /&gt; repositoryBrowsing: toolbar.rootNode != null,&lt;BR /&gt; useTitle: (useTitle == "true"),&lt;BR /&gt; syncMode: toolbar.syncMode != null ? toolbar.syncMode : "",&lt;BR /&gt; createContentByTemplateEnabled: model.createContentByTemplateEnabled,&lt;BR /&gt; createContentActions: model.createContent&lt;BR /&gt; }&lt;BR /&gt; };&lt;BR /&gt; &lt;BR /&gt; var documentList = {&lt;BR /&gt; id : "DocumentList", &lt;BR /&gt; name : "Alfresco.DocumentList",&lt;BR /&gt; options : {&lt;BR /&gt; syncMode : model.syncMode != null ? model.syncMode : "", &lt;BR /&gt; siteId : (page.url.templateArgs.site != null) ? page.url.templateArgs.site : "",&lt;BR /&gt; containerId : template.properties.container != null ? template.properties.container : "documentLibrary",&lt;BR /&gt; rootNode : model.rootNode != null ? model.rootNode : "null",&lt;BR /&gt; repositoryRoot : model.rootNode,&lt;BR /&gt; usePagination : (args.pagination == "true"),&lt;BR /&gt; sortAscending : (model.preferences.sortAscending != null ? model.preferences.sortAscending : true),&lt;BR /&gt; sortField : model.preferences.sortField != null ? model.preferences.sortField : "cm:name",&lt;BR /&gt; showFolders : (model.preferences.showFolders != null ? model.preferences.showFolders : true),&lt;BR /&gt; hideNavBar: (model.preferences.hideNavBar != null ? model.preferences.hideNavBar : false),&lt;BR /&gt; simpleView : model.preferences.simpleView != null ? model.preferences.simpleView : "null",&lt;BR /&gt; viewRenderers: model.viewRenderers,&lt;BR /&gt; viewRendererName : model.preferences.viewRendererName != null ? model.preferences.viewRendererName : "detailed",&lt;BR /&gt; viewRendererNames : model.viewRendererNames != null ? model.viewRendererNames : ["simple", "detailed", "gallery", "filmstrip"],&lt;BR /&gt; highlightFile : page.url.args["file"] != null ? page.url.args["file"] : "",&lt;BR /&gt; replicationUrlMapping : model.replicationUrlMapping != null ? model.replicationUrlMapping : "{}",&lt;BR /&gt; repositoryBrowsing : model.rootNode != null, &lt;BR /&gt; useTitle : (model.useTitle != null ? model.useTitle == "true" : true),&lt;BR /&gt; userIsSiteManager : model.userIsSiteManager,&lt;BR /&gt; associatedToolbar: { _alfValue: "docListToolbar", _alfType: "REFERENCE" },&lt;BR /&gt; commonComponentStyle : model.commonComponentStyle,&lt;BR /&gt; suppressComponent : model.suppressComponent,&lt;BR /&gt; filmstripImageLazyLoading: model.filmstripImageLazyLoading == "true"&lt;BR /&gt; }&lt;BR /&gt; };&lt;BR /&gt; if (model.repositoryUrl != null)&lt;BR /&gt; {&lt;BR /&gt; documentList.options.repositoryUrl = model.repositoryUrl;&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; model.widgets = [docListToolbar, documentList];&lt;BR /&gt; &lt;STRONG&gt;model.widgets[1].options.pageSize = 10;&lt;/STRONG&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.- In this case we have establish ten items per page&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.- We must restart Alfresco Service and after that this configuration will be available&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="14365" alt="Items per page" class="image-1 jive-image j-img-original" src="https://connect.hyland.com/legacyfs/online/alfresco/14365_elementos_por_pagina.jpg" style="width: 620px; height: 494px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2017 09:37:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/limiting-the-number-of-documents-shown-on-a-doclib-page/m-p/40167#M16845</guid>
      <dc:creator>calvo</dc:creator>
      <dc:date>2017-06-14T09:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting the number of documents shown on a DocLib page</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/limiting-the-number-of-documents-shown-on-a-doclib-page/m-p/40168#M16846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Calvo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks alot for the explanation, I will try to do this later this week. Right now the modification we did works and good for a demo/mock up. But for sure your approach looks a bit more mature.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Zsolt Putnoky&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2017 15:12:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/limiting-the-number-of-documents-shown-on-a-doclib-page/m-p/40168#M16846</guid>
      <dc:creator>zputnoky</dc:creator>
      <dc:date>2017-06-14T15:12:38Z</dc:date>
    </item>
  </channel>
</rss>

