I have a split navigation module defined in my custom template. It is set to display submenu items under the main navigation when the parent item is active. The module itself displays correctly, but if I perform a check to define a CSS class or display sample HTML, the if statement does not work correctly.
My template module code and parameters are included below.
Template Code (index.php)
<?php if($this->countModules('global-nested-navigation')): ?> <!-- Sample HTML -->Yolo!<!-- / Sample HTML --> <jdoc:include type="modules" name="global-nested-navigation" /> <?php endif; ?>
The nested navigation module is not displayed until the parent menu item is active, but the sample HTML is displayed on every page. I have included two screenshots showing the sample text, one for the homepage and the other with parent menu item active.
A screenshot of the nested navigation parameters in also included below.
Here are the top level navigation parameters:
- "Base Item" set to Current
- "Start Level" and "End Level" to 1
- "Show Sub-menu Items" set to None