Page 1 of 1

Add Link to the top nav bar

Posted: Sun Apr 07, 2019 4:24 am
by Valerina
Hey All

I am on oc 3.0.3 and using the default theme.
In the top nav, I have used css to hide all links except for the phone number link.
Beside that I would like to add a Terms & Conditions link...
I have added in the code for this in the header.twig file, cleared cache, but not showing up
What am I doing wrong.

Code: Select all

<nav id="top">
  <div class="container">{{ currency }}
    {{ language }}
    <div id="top-links" class="nav pull-right">
      <ul class="list-inline">
        <li><a href="{{ contact }}"><i class="fa fa-phone"></i></a> <span class="hidden-xs hidden-sm hidden-md">{{ telephone }}</span></li>
        <li class="dropdown"><a href="{{ account }}" title="{{ text_account }}" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i> <span class="hidden-xs hidden-sm hidden-md">{{ text_account }}</span> <span class="caret"></span></a>
          <ul class="dropdown-menu dropdown-menu-right">
            {% if logged %}
            <li><a href="{{ account }}">{{ text_account }}</a></li>
            <li><a href="{{ order }}">{{ text_order }}</a></li>
            <li><a href="{{ transaction }}">{{ text_transaction }}</a></li>
            <li><a href="{{ download }}">{{ text_download }}</a></li>
            <li><a href="{{ logout }}">{{ text_logout }}</a></li>
            {% else %}
            <li><a href="{{ register }}">{{ text_register }}</a></li>
            <li><a href="{{ login }}">{{ text_login }}</a></li>
            {% endif %}
          </ul>
        </li>
        <li><a href="{{ wishlist }}" id="wishlist-total" title="{{ text_wishlist }}"><i class="fa fa-heart"></i> <span class="hidden-xs hidden-sm hidden-md">{{ text_wishlist }}</span></a></li>
        <li><a href="{{ shopping_cart }}" title="{{ text_shopping_cart }}"><i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md">{{ text_shopping_cart }}</span></a></li>
        <li><a href="{{ checkout }}" title="{{ text_checkout }}"><i class="fa fa-share"></i> <span class="hidden-xs hidden-sm hidden-md">{{ text_checkout }}</span></a></li>
        <li><a href="index.php?route=information/information&information_id=5">Terms & Conditions</a><li>
      </ul>
    </div>
  </div>
</nav>
Image

Re: Add Link to the right of top nav bar

Posted: Sun Apr 07, 2019 4:27 am
by straightlight

Re: Add Link to the top nav bar

Posted: Sun Apr 07, 2019 10:26 pm
by letxobnav
to start, close the <li> tag properly.

Code: Select all

<li><a href="index.php?route=information/information&information_id=5">Terms & Conditions</a><li>
also suggest you construct href and link text in your controller instead of the view.