<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body style="font-family:Segoe UI,Verdana,Arial,sans-serif;"
alink="#EE0000" bgcolor="#FFFFFF" link="#0000EE" text="#000000"
vlink="#551A8B">
<p>Hello,<br>
</p>
<p>as I have rewritten navigation creation I wanted a better
detection if an nav item is the currently requested page. I had
some problems using "startsWith" like in example Bootstrap
template code, I don't want the parent folders containing current
item to be marked as well.<br>
</p>
<p>So I made this more strict one:<br>
</p>
<p><tt>boolean _isCurrent(CmsJspActionElement cms, CmsJspNavElement
elem) {</tt><br>
<tt> if ((cms != null) && (elem != null)) {</tt><br>
<tt> String uri = (elem.isFolderLink()) ?
cms.getRequestContext().getFolderUri() :
cms.getRequestContext().getUri();</tt><br>
<tt> if (uri != null) {</tt><br>
<tt> return uri.equals(elem.getResourceName());</tt><br>
<tt> }</tt><br>
<tt> }</tt><br>
<tt> return false;</tt><br>
<tt>}</tt><br>
</p>
<p>What is missing now is the one exception from the rule, on detail
pages I surely want to mark the upper level (the list page) as
current. Any hint how I can find out that current uri is to a
detail page?<br>
</p>
<p>Regards,<br>
Thorsten<br>
</p>
</body>
</html>