RE: get list?size in freemarker whe pagination is active

Iñigo Boyano, modified 6 Years ago. Junior Member Posts: 96 Join Date: 2/4/14 Recent Posts
Hi, 

I need to get the total entries of a list in a freemarker ADT when the pagination of the asset publisher is enabled.

With the instruction "${entries?size}", i get the total entries of the current page, but i need to get all of them.

Kind regards, 

​​​​​​​Íñigo
thumbnail
Amos Fong, modified 6 Years ago. Liferay Legend Posts: 2047 Join Date: 10/7/08 Recent Posts
Unfortunately, I don't that variable is available to you. I think one option is to create a jsp fragment and override the asset publisher jsp and put the searchContainer.getTotal() into the request attributes. Then I think it should be available in the freemarker ADT from ${renderRequest}.