th:each="entry : ${submenu}"
th:with="
childs=${entry == parent ? null : _childs.get(entry)},
- leaf=${pos == (len - 1) and (childs == null or childs.size() == 0)},
+ leaf=${pos >= (len - 1)},
child=${pos == len},
selected=${!child and crumbs.get(pos) == entry},
active=${entry == uri},