Commit 670b320b authored by chauveau's avatar chauveau
Browse files

petite modif branche sur le pattern d'une route du pager

parent d5a11192
......@@ -90,7 +90,7 @@ declare variable $max.plugin.pager:ITEMS_PATH := "itemsPath";
declare
%rest:GET
%output:method("html")
%rest:path("/editions/{$project}/{$route=.*\.xml}/page/{$n}")
%rest:path("/editions/{$project}/{$route=.*\.xml}/page/{$n=[0-9]+}")
function max.plugin.pager:paginate($project as xs:string, $route as xs:string, $n as xs:integer){
let $routeDoc := if(starts-with($route,'doc/'))
then tokenize($route, 'doc/')[last()]
......@@ -106,7 +106,7 @@ function max.plugin.pager:paginate($project as xs:string, $route as xs:string, $
max.config:getXSLTAddons($project, $route))
let $xsltParams := max.config:getXSLTParams($project, $route)
let $html := xslt:transform($xml, $xsltDoc, $xsltParams)
let $html := xslt:transform($xml, $xsltDoc, $xsltParams)
(:return max.config:getXSLTAddons($project, $route):)
let $res := <div id='pagerBlocks'>
<h4>{$navLinks}</h4>
......@@ -250,6 +250,14 @@ function max.plugin.pager:check($project){
</div>
};
declare
%rest:GET
%output:method("html")
%rest:path("/editions/{$project}/pager/test")
function max.plugin.pager:test($project){
<div>PAGER TEST OK</div>
};
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment