diff --git a/dist/xslt/helpers/_CalendarHelper.xslt b/dist/xslt/helpers/_CalendarHelper.xslt index e0d8c9a..f2f5bf7 100644 --- a/dist/xslt/helpers/_CalendarHelper.xslt +++ b/dist/xslt/helpers/_CalendarHelper.xslt @@ -3,7 +3,7 @@ ]> - + diff --git a/dist/xslt/helpers/_GroupingHelper.xslt b/dist/xslt/helpers/_GroupingHelper.xslt index b5139ea..1c25ca0 100644 --- a/dist/xslt/helpers/_GroupingHelper.xslt +++ b/dist/xslt/helpers/_GroupingHelper.xslt @@ -1,5 +1,5 @@ - + diff --git a/dist/xslt/helpers/_MediaHelper.xslt b/dist/xslt/helpers/_MediaHelper.xslt index be96dc4..3cad1c7 100644 --- a/dist/xslt/helpers/_MediaHelper.xslt +++ b/dist/xslt/helpers/_MediaHelper.xslt @@ -8,7 +8,7 @@ Enables simple retrieval of media by handling the GetMedia() call and error-checking --> - + diff --git a/dist/xslt/helpers/_MultiPickerHelper.xslt b/dist/xslt/helpers/_MultiPickerHelper.xslt index c78a329..1d0368d 100644 --- a/dist/xslt/helpers/_MultiPickerHelper.xslt +++ b/dist/xslt/helpers/_MultiPickerHelper.xslt @@ -4,7 +4,7 @@ Helper file for rendering various datatypes that store node ids. --> - + diff --git a/dist/xslt/helpers/_NavigationHelper.xslt b/dist/xslt/helpers/_NavigationHelper.xslt index 0ef72dc..7407a8c 100644 --- a/dist/xslt/helpers/_NavigationHelper.xslt +++ b/dist/xslt/helpers/_NavigationHelper.xslt @@ -3,7 +3,7 @@ ]> - + diff --git a/dist/xslt/helpers/_PaginationHelper.xslt b/dist/xslt/helpers/_PaginationHelper.xslt index ba44959..bb08e0d 100644 --- a/dist/xslt/helpers/_PaginationHelper.xslt +++ b/dist/xslt/helpers/_PaginationHelper.xslt @@ -1,5 +1,5 @@ - + @@ -58,6 +58,12 @@ + + + + + + @@ -78,11 +84,12 @@ - + + @@ -90,6 +97,11 @@ + + + + + @@ -283,10 +295,11 @@ + - + @@ -337,5 +350,15 @@ + + + + + + diff --git a/paginationhelper/README.md b/paginationhelper/README.md index 06a80be..3bc777c 100644 --- a/paginationhelper/README.md +++ b/paginationhelper/README.md @@ -80,12 +80,12 @@ It won't cover every scenario, e.g. it doesn't do numerical sorting, and you can ### Advanced sorting -Because XSLT allows for some very special sorting (e.g., sorting by a substring of a value or the combined value of two or more values), there need to be a way to support this, so by sending the string **'$CUSTOM'** into the `sortBy` parameter, the helper will execute a named template (**"customSort"**) to perform the sorting, so in that one you can just paste your existing sort statements, e.g.: +Because XSLT allows for some very special sorting (e.g., sorting by a substring of a value or the combined value of two or more values), there need to be a way to support this, so by specifying the `customSort` parameter as `true()`, the helper will execute a named template (**"customSort"**) to perform the sorting, so in that one you can just paste your existing sort statements, e.g.: ```xslt - + ... @@ -99,6 +99,33 @@ Because XSLT allows for some very special sorting (e.g., sorting by a substring ``` +## Advanced template handling + +Now *what if* you have to pass a parameter to every item you render in the paginated set? Or maybe your original (un-paginated) output had two modes, e.g. a "list" mode and a "grid" mode? (It could happen :) Can you still just *inject* Pagination Helper into the mix and have everything "just work"? + +Well, you can at least specify that you would like a little bit more control, and that you will in fact personally oversee the specific rendering of each page yourself. Here's how: + +You pass the parameter `customApply` (set to `true()`) and then you modify the named "customApply" template to suit your needs, e.g., to pass an index variable to the item template, you can do this: + +```xslt + + + + + +... + + + + + + + +``` + +*Note: You can take the "customSort" and/or "customApply" templates out of the Pagination Helper file and put them in your main XSLT file to have them survive between updates. Just remember to delete them from the Pagination Helper* + + ## QueryString options The pager links rendered will include all existing querystring options on the original page (i.e., "page 1"), so if diff --git a/paginationhelper/_PaginationHelper.xslt b/paginationhelper/_PaginationHelper.xslt index 5509694..22d6827 100644 --- a/paginationhelper/_PaginationHelper.xslt +++ b/paginationhelper/_PaginationHelper.xslt @@ -85,6 +85,12 @@ + + + + + + @@ -105,11 +111,12 @@ - + + @@ -117,6 +124,11 @@ + + + + + @@ -310,10 +322,11 @@ + - + @@ -364,5 +377,15 @@ + + + + + + - \ No newline at end of file + diff --git a/paginationhelper/entities.ent b/paginationhelper/entities.ent index b220eb6..db807db 100644 --- a/paginationhelper/entities.ent +++ b/paginationhelper/entities.ent @@ -1,8 +1,6 @@ - - diff --git a/paginationhelper/test/CustomApplyTest.xspec b/paginationhelper/test/CustomApplyTest.xspec new file mode 100644 index 0000000..5a741eb --- /dev/null +++ b/paginationhelper/test/CustomApplyTest.xspec @@ -0,0 +1,26 @@ + + + + + + + + + + + + +

"James Sawyer" <james.sawyer@4815162342x.com>

+

"Kate Austen" <kate.austen@4815162342x.com>

+

...

+

...

+

"Jack Shepard" <jack.shepard@4815162342x.com>

+
+
+
+ +
diff --git a/paginationhelper/test/PaginationHelperCustomApplySample.xslt b/paginationhelper/test/PaginationHelperCustomApplySample.xslt new file mode 100644 index 0000000..b0f6f7f --- /dev/null +++ b/paginationhelper/test/PaginationHelperCustomApplySample.xslt @@ -0,0 +1,33 @@ + + + + " + + + + + + + + + + + + + + +

+ +

+
+ + +

+
+ + + +
diff --git a/paginationhelper/test/PaginationHelperSample.xslt b/paginationhelper/test/PaginationHelperSample.xslt index cca5233..1567148 100644 --- a/paginationhelper/test/PaginationHelperSample.xslt +++ b/paginationhelper/test/PaginationHelperSample.xslt @@ -21,7 +21,5 @@ - - -
\ No newline at end of file +
diff --git a/paginationhelper/test/PaginationHelperSortedSample.xslt b/paginationhelper/test/PaginationHelperSortedSample.xslt index 68c7567..bfdc164 100644 --- a/paginationhelper/test/PaginationHelperSortedSample.xslt +++ b/paginationhelper/test/PaginationHelperSortedSample.xslt @@ -24,4 +24,4 @@ -
\ No newline at end of file + diff --git a/paginationhelper/test/PaginationHelperSortedTest.xspec b/paginationhelper/test/PaginationHelperSortedTest.xspec index 90a1868..6d23223 100644 --- a/paginationhelper/test/PaginationHelperSortedTest.xspec +++ b/paginationhelper/test/PaginationHelperSortedTest.xspec @@ -163,9 +163,9 @@ - + - +

Hugo Reyes

diff --git a/version.ent b/version.ent index bc7a32f..8addced 100644 --- a/version.ent +++ b/version.ent @@ -1,8 +1,8 @@ - + - +