fixed broken indexing
This commit is contained in:
parent
af97248ef5
commit
eba5e849b3
1 changed files with 2 additions and 1 deletions
|
@ -440,7 +440,8 @@ declare %rest:path("{$lang}/dict/{$id}")
|
|||
%output:method("html")
|
||||
%output:html-version('5')
|
||||
function page:by-id($lang, $id) {
|
||||
let $doc-index := index-of($page:sorted, $page:sorted[@xml:id=`{$id}`])
|
||||
(: let $doc-index := index-of($page:sorted, $page:sorted[@xml:id=`{$id}`]) :)
|
||||
let $doc-index := index-where($page:sorted, fn { ./@xml:id=$id })
|
||||
let $pagenum := ceiling($doc-index div $page:items)
|
||||
return web:redirect('../dict', {'page': $pagenum}, web:decode-url($id))
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue