metismenu
metismenu copied to clipboard
Not working with url parameters?
Hi there! Is there some simple way for metismenu to recognize that page with url parameters is the same as the page without url parameters? For example, I have a menu item that goes to site search - search.php
When I go to this page, I have active menu item "Search". But when I submit GET form on this page, it takes me to page search.php?term=something and now the menu does not show that I am on Search page.
I'm having the opposite issue as you, metismenu ignores my url parameters and always highlights the item without parameters.
<ul class="metismenu">
<li class="side-nav-item">
<a href="javascript: void(0);" class="side-nav-link">
<i class="dripicons-view-apps"></i>
<span> Title </span>
<span class="menu-arrow"></span>
</a>
<ul class="side-nav-second-level" aria-expanded="false">
<li>
<a href="/page.jsp">No Params</a>
</li>
<li>
<a href="/page.jsp?param=123">With Params</a>
</li>
</ul>
</li>
</ul>
host:port/page.jsp
shows No Params Highlighted
host:port/page.jsp?param=123
shows No Params Highlighted
If I don't include an li element without parameters e.g
<ul class="metismenu">
<li class="side-nav-item">
<a href="javascript: void(0);" class="side-nav-link">
<i class="dripicons-view-apps"></i>
<span> Title </span>
<span class="menu-arrow"></span>
</a>
<ul class="side-nav-second-level" aria-expanded="false">
<li>
<a href="/page.jsp?param=123">With Params</a>
</li>
</ul>
</li>
</ul>
and I try to navigate to host:port/page.jsp?param=123
, it ignores the li completely and will not highlight any element
Same issue here (as original post). Dangit man :(. Let's hope I figure out a hack.