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 /

Linking mode - always on problem


Reply


3 Posts   666 Views

Avatar
Mackodlak

Community Member, 95 Posts

1 October 2011 at 12:25am

Why is this always on? I am not on this page, and in navigation $LinkingMode always returns positive so it's "selected"
   <% if CurrentMember %>
      <li class="$LinkingMode"><a href="ForumMemberProfile/edit" title="Uredi svoj profil">Uređivanje profila</a></li>
   <% end_if %>

Avatar
Willr

Forum Moderator, 5513 Posts

1 October 2011 at 4:42pm

The issue for code is that your scope for the $LinkingMode is the page that you're on, so of course it'll always be selected since it's always the page your on. To get it working for that piece of code you'll need to compare the current $URLSegment..

<% if CurrentMember %>
<li class="<% if URLSegment = ForumMemberProfile %>active<% else %>link<% end_if %>"><a href="ForumMemberProfile/edit" title="Uredi svoj profil">Uređivanje profila</a></li>
<% end_if %>

Avatar
Mackodlak

Community Member, 95 Posts

3 October 2011 at 7:51pm

Hey Willr,

thank you for your answer, this helps somewhat, but not entirely. It is not correctly showing as link, and not section, when I'm on some other page, but then it also shows link when I am on profile edit page. I don't rly understand why, It should work imo...