Jump to content

Getting member rank in mobileNavigation template


marina_ls

Recommended Posts

Posted

Hi there,

Could anyone explain me why I can't get the member's rank using this code in mobileNavigation template? 

 

          <div id='elUserNav_mobile-1b' class='ipsList_inline signed_in ipsClearfix'>
                  <ul id='elUserNav_mobile-2' class='ipsList_inline signed_in ipsClearfix'>
                    <li id='cUserLink'>
			<a href='{member="url()"}' id='elUserLinkb'>
				{{if isset( $_SESSION['logged_in_as_key'] )}}{lang="front_logged_in_as" sprintf="$_SESSION['logged_in_from']['name']"} {{endif}}{member="name"}
                  </a>
                  </li>
                    <li id='cUserRankcs'><p class='ipsType_reset ipsType_medium'>{$member->rank['title']}</p></li>
          </ul>
          </div>

{$member->rank['title']} works well in other templates like hovercard or profileHeader...

Thanks in advance!!

Posted

hey @Adriano Faria !

Thanks for the solution! However, I did it and the editor says that there is an error in the code and I can't save the template. I'm missing something here?

			<a href='{member="url()"}' id='elUserLinkb'>
				{{if isset( $_SESSION['logged_in_as_key'] )}}{lang="front_logged_in_as" sprintf="$_SESSION['logged_in_from']['name']"} {{endif}}{member="name"}
                  </a>
                  </li>
                    {{$rank = \IPS\Member::loggedIn()->rank['title']}}
                    <li id='cUserRankcs'><p class='ipsType_reset ipsType_medium'>{$rank}</p></li>
          </ul>


 

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...