Skip to content

Commit

Permalink
Workaround to re-enable access to roaster request parameters from HTM…
Browse files Browse the repository at this point in the history
…L templating
  • Loading branch information
wolfgangmm committed Oct 11, 2024
1 parent 3992b4b commit 74bc270
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/lib/util.xql
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,16 @@ declare function tpu:parse-pi($doc as document-node(), $view as xs:string?, $odd
};

declare function tpu:get-template-config($request as map(*)) {
for $param in map:keys($request?parameters)
return
request:set-attribute($param, $request?parameters($param)),
map:merge((
$tpu:template-config,
map {
$templates:CONFIG_PARAM_RESOLVER : function($param) {
let $pval := array:fold-right(
[
request:get-parameter($param, ()),
(: if (map:contains($request, 'parameters')) then $request?parameters($param) else (), :)
request:get-attribute($param),
session:get-attribute($config:session-prefix || "." || $param)
], (),
Expand Down

0 comments on commit 74bc270

Please sign in to comment.