∇ R←RenderMenu
R←'<ul>',nl
R,←' <li',(ActiveIf'Index'),'Home</a></li>',nl
R,←' <li',(ActiveIf'Fotos'),'Fotos</a></li>',nl
R,←' <li',(ActiveIf'Listen'),'Listen</a></li>',nl
R,←'</ul>',nl
∇
∇ R←ActiveIf nam
⎕←z←∨/(⎕← #.Strings.uc nam) ⍷ ⎕← #.Strings.uc #.HTMLUtils.enlist ⍕ #.Pages.⎕INSTANCES #.Pages.Klassenweb
R←z/' class="active"'
R,←'><a href="/',nam,'.dyalog">'
∇
The function ActiveIf should return the string class="active if the name of the linked class matches the name of the "currently active child-class" and then append the opening a-tag. The idea of checking ⎕INSTANCES only works as long as the other pages haven't been active, so I need another way to find the current instance of a class that called a fn in the base class it inherited from. Surely there must be an elegant way to do this, but I'm afraid I missed that bit... :((