Skip to content

Commit

Permalink
Check wether a navigator category contains any items or not, closes #11
Browse files Browse the repository at this point in the history
  • Loading branch information
nikobeer committed Nov 17, 2022
1 parent 7d136a7 commit 5a688cc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions add/data/xql/getNavigatorConfig.xql
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,7 @@ declare function local:getSeparator() {
declare function local:getDefinition($navConfig) {
let $elems := $navConfig/*
for $elem in $elems

return

if(local-name($elem) eq 'navigatorItem')
then(
local:getItem($elem, 1)
Expand All @@ -122,7 +120,12 @@ declare function local:getDefinition($navConfig) {
)
else if(local-name($elem) eq 'navigatorCategory')
then(
local:getCategory($elem, 1)
(: check if there are any items in category to show, dependig on (RWA) rules defined in local:getDefinition :)
let $category := local:getCategory($elem, 1)
return
if ($category//div[@class="navigatorItem"])
then ($category)
else ()
)
else()
};
Expand Down

0 comments on commit 5a688cc

Please sign in to comment.