% my $categories = stash 'categories'; <%== $categories->{index}{menu_text} %> <% my $first = 1; for my $category_key (sort { $categories->{$a}{priority} <=> $categories->{$b}{priority} } keys %$categories) { my $category = $categories->{$category_key}; if (defined $category->{parent}) { next; } %><%==$category->{menu_text}%><% for my $child_category ($category->{children}->@*) { %>{slug}"%>">* <%==$child_category->{menu_text}%><% }%><% } %>