I extracted a list of pages and for each I have a counter.
For example:
Name1 10
Name2 20
Name3 15
I’d like to insert them into a html sortable and searchable table in order to filter and sort number
Could you please to help me? Is it possible?
Thanks
NorSch
2
Hi,
something like
{{velocity}}
#set ($discard=$xwiki.ssfx.use("js/xwiki/table/table.css"))
#set ($discard=$xwiki.jsfx.use("js/xwiki/table/tablefilterNsort.js", true))
{{/velocity}}
(% class="doOddEven grid sortable" id="myId2" %)
(% class="sortHeader" %)|=Name|=Value
|Name1 |10
|Name2 |20
|Name3 |15
|Name4 |4
or with an additional filter header
(% class="doOddEven filterable grid sortable" id="myId1" %)
(% class="sortHeader" %)|=Name|=Value
|Name1 |10
|Name2 |20
|Name3 |15
|Name4 |4
Note: As column 2 contains numbers, sorting is numerically done.
Easy.
1/ enable this extension, “Make All Wiki Tables Sortable Macro”
2/ add the sortable tables macro to your web page, either through the gui editor, or via wiki code, e.g.
{{sortable_tables filterable=“yes”/}}