01-23-2019 06:04 AM
Hii every Alfresco-man !!!
I want to add number of items in page dynamically in my alfresco share 5.2 .
for example show items in page by 10 or 30 or 40
for the static way the line : model.widgets[1].options.pageSize , but dynamic way i don't get how to do that
could you help me please
01-24-2019 07:49 AM
No response !!!
01-24-2019 10:30 AM
At which place you want to apply this functionality and up to now what you have tried?
01-24-2019 10:37 AM
Hii Sanjay ,
thks for your response ; I want to apply it on the documentlibrary.
I hope this is the answer you want
01-24-2019 10:40 AM
I tried :
model.widgets[i].options.pageSize = [10, 20,30];
but it doesn't work
01-25-2019 12:53 AM
Hi,
To get row per page dynamically,First of you have to configure dropdown in documentlibrary toolbar.
site-webscripts\org\alfresco\components\documentlibrary\include\documentlist_v2.lib.ftl
Put below code inside above file at proper place.
Ex.
<div>
<span id="${id}-rowPerPage-button" class="yui-button yui-push-button">
<span class="first-child">
<button>Row Per Page</button>
</span>
</span>
<select id="${id}-rowPerPage">
<option>10</option>
<option>20</option>
</select>
</div>
components\documentlibrary\documentlist.js
After that configure that select inside above file.
Ex.
if (Dom.get(this.id + "-rowPerPage"))
{
this.widgets.rowPerPage = Alfresco.util.createYUIButton(this, "rowPerPage-button", this.changePage, {
type: "menu",
menu: "rowPerPage"
});
if (this.widgets.rowPerPage !== null)
{
this.dynamicControls.push(this.widgets.rowPerPage);
}
}
You can take reference of sorting menu/documentlibrary view menu.
Some how you have to get selected option from rowPerPage and you need to set in this.options.pageSize.
I have not tried this scenario but you can set this way try.
If you succeed then please post your step/code so it will be helpful to others.
Thanks,
01-25-2019 10:09 AM
HELOOO!
Finally I can show my button and dropdown list , thks a lot. But I dont understand how can i link it with pageSize.
have you i link for sorting documentlibrary to take it as an example ?
thks a lot
10-31-2023 12:03 PM
Hi,
Did you got any solution , how to implement this because I need to implement this functionality.
Thanks in advance.
Explore our Alfresco products with the links below. Use labels to filter content by product module.