user934667
user934667

Reputation: 11

Concrete 5 Theme: for Menu navigation

i am new to concrete 5, i search alot for theming of Menu (i.e: sub menu's) navigation with image icon and description but not found any related material. i have the following Html:

<div class="menu">
    <ul>
      <li><a href="default.php" class="active"><span>Hem</span></a></li>
        <ul>
          <li><a href="default.php" class="active"><span>New</span></a><img href="images/first.jpg" /><span class='short-description'>some description</span></li>
          <li><a href="default.php" class="active"><span>Nice</span></a></li>
        </ul>
      <li><a href="about.php"><span>Om oss</span></a></li>
        <ul>
          <li><a href="#" class="active"><span>Om Shine</span></a><img href="images/second.jpg" /><span class='short-description'>some description</span></li>
          <li><a href="#" class="active"><span>Uom</span></a></li>
          <li><a href="#" class="active"><span>Opasd</span></a><img href="images/third.jpg" /><span class='short-description'>some description</span></li>
          <li><a href="#" class="active"><span>Hem</span></a></li>
        </ul>
      <li><a href="services.php"><span>Tjänster</span></a></li>
      <li><a href="references.php"><span>Referenser</span></a></li>
      <li><a href="contact.php"><span> Kontakt</span></a></li>
    </ul>
</div>

So how i can theme for this in concrete 5. or use like.

    <div id="headerNav">
      <?php  
         $a = new Area('Header Nav');
         $a->display($c);
     ?>
   </div>

Any idea about it, that how to theme for this in concrete 5 for sub menus with description and image icon.... Thanx.

Upvotes: 0

Views: 660

Answers (1)

Darshan Shah
Darshan Shah

Reputation: 71

Open file concrete\concrete\blocks\autonav, and changed line

if ($c->getCollectionID() == $_c->getCollectionID()) { 
    echo('<li class="nav-selected nav-path-selected"><a class="nav-selected nav-path-selected" ' . $target . ' href="' . $pageLink . '">' . $ni->getName() . '</a>');
}

Apply your active class in " tag like

if ($c->getCollectionID() == $_c->getCollectionID()) { 
    echo('<li class="nav-selected nav-path-selected"><a class="active" ' . $target . ' href="' . $pageLink . '">' . $ni->getName() . '</a>');
}

Upvotes: 0

Related Questions