Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
I am implementing couch cms on the 'Half Slider' bootstrap template that I downloaded from startbootstrap.com (link). I am transforming that template into the site of my daughter's sports club. In that template the menu has css classes set on the LI tags and even on the A tags within the LI.

Is it possible to style this using menu (or nested_pages) ? As far as I can read from the documentation, it's only possible to style UL and OL, and set styles on first and last element, and selected element. What I need is to set a class on *each* LI and *each* A within LI on the menu.

Here's a snippet of the menu from the template:

Code: Select all
<ul class="navbar-nav ml-auto">
  <li class="nav-item active">
    <a class="nav-link" href="#">Home
      <span class="sr-only">(current)</span>
    </a>
  </li>
  <li class="nav-item">
   <a class="nav-link" href="#">About</a>
  </li>
  <li class="nav-item">
    <a class="nav-link" href="#">Services</a>
  </li>
  <li class="nav-item">
    <a class="nav-link" href="#">Contact</a>
  </li>
</ul>
"I have never tried that before, so I think I should definitely be able to do that" - Pippi Longstocking
Found the answer: nested_pages
Now rebuilding the menu into something like this:

Code: Select all
<ul class="navbar-nav ml-auto">
  <cms:nested_pages masterpage='index.php'>
    <li class="nav-item active">
      <a class="nav-link" href="<cms:show k_nestedpage_link />"><cms:show k_nestedpage_title /></a><br />
    </li>
  </cms:nested_pages>
</ul>
"I have never tried that before, so I think I should definitely be able to do that" - Pippi Longstocking
2 posts Page 1 of 1