Commit 59fba5ad authored by Arnaud Daret's avatar Arnaud Daret
Browse files

Test pour inclure un fragment depuis un autre

parent 0ce26064
......@@ -108,6 +108,24 @@ function max:page($project, $page){
catch err:XPTY0004 {max:max-error('Configuration dupliquée - Veuillez vérifier votre fichier de configuration', $err:description,$err:module, $err:line-number)}
};
(:gets a project's HTML fragment page:)
declare
%rest:GET
%output:method("xml")
%output:indent("no")
%output:encoding("UTF-8")
%rest:path( "/{$project}/html_fragment/{$page=[a-zA-Z0-9_]+}")
function max:html_fragment($project, $page){
try {
let $content := max.html:getHTMLFragmentFile($project, $page)
return $content
}
catch err:FODC0002 {max:max-error('Page/fragment ' || $page || ' introuvable ou mal formé', $err:description, $err:module, $err:line-number)}
catch err:config {max:max-error('', $err:description, $err:module, $err:line-number)}
catch err:FODC0002 {max:max-error('', $err:description, $err:module, $err:line-number)}
catch err:XPTY0004 {max:max-error('Configuration dupliquée - Veuillez vérifier votre fichier de configuration', $err:description, $err:module, $err:line-number)}
};
declare
%rest:GET
......
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