Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Template Questions /

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba

navigation sort - resolved


Go to End
Reply


2 Posts   542 Views

Avatar
cyshift

Community Member, 2 Posts

11 September 2011 at 8:25am

hello guys,

sorry but my english is not very good.

I'm new here and have a question.

i have a main navigation:

<ul>
<li>Startpage</li>
<li>Portfolio</li>
<li>Contact</li>
<li>…</li>
<li>…</li>
</ul>

I would like that the current navigation point always comes at first Position.

As Example:
<ul>
<li class="current">Portfolio</li>
<li>Startpage</li>
<li>Contact</li>
<li>…</li>
<li>…</li>
</ul>

or:

<ul>
<li class="current">Contact</li>
<li>Startpage</li>
<li>Portfolio</li>
<li>…</li>
<li>…</li>
</ul>

how can I define this sorting ?

Many thanks

Avatar
cyshift

Community Member, 2 Posts

11 September 2011 at 11:04am

Edited: 11/09/2011 11:05am

Hi,

i found a solution:

    <ul>
      <% control Menu(1) %>
        <% if LinkingMode = current %>
          <li class="current">
            <a href="$Link">$MenuTitle.XML</a>
            <div class="arrow"></div>
          </li>
        <% else_if LinkingMode = section %>
          <li class="current">
            <a href="$Link">$MenuTitle.XML</a>
            <div class="arrow"></div>
          </li>
        <% end_if %>
      <% end_control %>
      <% control Menu(1) %>
        <% if LinkingMode = link %>
          <li>
            <a href="$Link">$MenuTitle.XML</a>
            <div class="arrow"></div>
          </li>
        <% end_if %>
      <% end_control %>
    </ul>

it works great