Customizing the Item/page dropdown feature

In a normal setting, the Item/page dropdown has 6 options to display the number of reports: 5, 10, 20, 30, 40, and 50. But I need to customize these settings so that I can see hundreds, so I want to change to 10, 25, 50, 100, 150, 200.

I went into the content_view_result_layout_selector.xhtml to configure this but every time I restart the nuxeo server, it goes back to the original code that was made. How can I overwrite the default in the code?

I even included this code:

   onchange="Element.next(this).firstChild.click();">
   <f:convertNumber />
   <f:selectItem itemValue="10" itemLabel="10" />
   <f:selectItem itemValue="25" itemLabel="25" />
   <f:selectItem itemValue="50" itemLabel="50" />
   <f:selectItem itemValue="100" itemLabel="100" />
   <f:selectItem itemValue="150" itemLabel="150" />
   <f:selectItem itemValue="200" itemLabel="200" />
   </h:selectOneMenu>
0 votes

1 answers

2326 views

ANSWER



You'll have to create a bundle (http://doc.nuxeo.com/display/NXDOC/How+to+create+an+empty+bundle) and include the modification there.

In the bundle you can overwrite the file (not too good approach) or contribute using an extension: http://doc.nuxeo.com/display/NXDOC/How+to+Contribute+to+an+Extension

Note that the template content_view_result_layout_selector.xhtml has been deprecated from version 5.7.2. From version 6.0, the template to override is named content_view_page_size_selector.xhtml.

0 votes



Hi,

I converted your comment to an answer because it's the only way to customize this behaviour for now.

I've updated the answer to reflect future changes (templates have changed in more recent versions)

03/05/2015