I decided to not go ahead with the auto adding of pages to the nav menu and do it the normal way of creating the clonable page and then creating a pointer page/link under the nested page and it add it to the menu that way.
Now I am wanting to create a nav menu with submenu using bootstrap 4 and integrate couchcms into it but unsure on how to do it
I have created a pointer page in the nested page section on the backend and created the clonable page in that section, below is the coding I am going to use but not sure how to integrate the couchcms tags into it as not done a submenu before with couchcms and bootstrap
UPDATE: I am slowly winning as got the nav menu working with couchcms tags integrated but I have dropdown icons showing on links that don't have a sub menu but good thing is I have the dropdown on the link that does have a submenu link
I have attached a screenshot of what I am getting
Now I am wanting to create a nav menu with submenu using bootstrap 4 and integrate couchcms into it but unsure on how to do it
I have created a pointer page in the nested page section on the backend and created the clonable page in that section, below is the coding I am going to use but not sure how to integrate the couchcms tags into it as not done a submenu before with couchcms and bootstrap
UPDATE: I am slowly winning as got the nav menu working with couchcms tags integrated but I have dropdown icons showing on links that don't have a sub menu but good thing is I have the dropdown on the link that does have a submenu link
- Code: Select all
<!-- Static navbar -->
<nav class="navbar navbar-expand-md navbar-light bg-light btco-hover-menu">
<a class="navbar-brand" href="#">Navbar</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<cms:nested_pages masterpage='index.php' extended_info='1' >
<cms:if k_level_start >
<cms:if k_level='0'>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="<cms:show k_menu_link />"><cms:show k_menu_title /></a>
</li>
<cms:else />
<ul>
</cms:if>
</cms:if>
<cms:if k_element_start >
<li id="item-<cms:show k_nestedpage_name />" class="nav-item dropdown level-<cms:show k_level/><cms:if k_total_children> has-submenu</cms:if><cms:if k_first_child> first</cms:if><cms:if k_last_child> last</cms:if><cms:if k_is_active> active</cms:if><cms:if k_is_current> current</cms:if>">
<a class="nav-link dropdown-toggle" href="<cms:show k_menu_link />" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><cms:show k_menu_title /></a>
</cms:if>
<cms:if k_element_end ></li></cms:if>
<cms:if k_level_end ></ul></cms:if>
</cms:nested_pages>
</div>
</nav>
I have attached a screenshot of what I am getting