Jump to content

Mobile Navigation extra menu items


PPlanet

Recommended Posts

Posted

I've modified my mobileNavBar template to add a couple of menu items.

5a41d285a37d9_ScreenShot2017-12-26at3_34_44pm.png.cb7ca5dda5196dd06b378ba02ba914c3.png

Does anyone know how can I hide these two extra items from guests? (The pencil and refresh ones, so the two last ones in the code below)

	    {{$defaultStream = \IPS\core\Stream::defaultStream();}}
    <li {{if !\IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'discover' ) ) }}class='ipsHide'{{endif}}>
        <a data-action="defaultStream" class='ipsType_light'  href='{{if $defaultStream}}{$defaultStream->url()}{{else}}{url="app=core&module=discover&controller=streams" seoTemplate="discover_all"}{{endif}}'><i class='icon-newspaper'></i></a>
    </li>
	      <li {{if !\IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'discover' ) ) }}class='ipsHide'{{endif}}>
        <a class='ipsType_light' href='{url="discover/6/" seoTemplate="Latest Reviews"}'><i class='fa fa-pencil-square-o'></i></a>
    </li>
	    <li {{if !\IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'discover' ) ) }}class='ipsHide'{{endif}}>
        <a class='ipsType_light' href='{url="discover" seoTemplate="all_activity"}'><i class='fa fa-refresh'></i></a>
    </li>
	

 

Posted
5 hours ago, PPlanet said:

I've modified my mobileNavBar template to add a couple of menu items.

5a41d285a37d9_ScreenShot2017-12-26at3_34_44pm.png.cb7ca5dda5196dd06b378ba02ba914c3.png

Does anyone know how can I hide these two extra items from guests? (The pencil and refresh ones, so the two last ones in the code below)

Like this

{{$defaultStream = \IPS\core\Stream::defaultStream();}}
    <li {{if !\IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'discover' ) ) }}class='ipsHide'{{endif}}>
        <a data-action="defaultStream" class='ipsType_light'  href='{{if $defaultStream}}{$defaultStream->url()}{{else}}{url="app=core&module=discover&controller=streams" seoTemplate="discover_all"}{{endif}}'><i class='icon-newspaper'></i></a>
    </li>
{{if \IPS\Member::loggedIn()->member_id}}
    <li {{if !\IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'discover' ) ) }}class='ipsHide'{{endif}}>
        <a class='ipsType_light' href='{url="discover/6/" seoTemplate="Latest Reviews"}'><i class='fa fa-pencil-square-o'></i></a>
    </li>
    <li {{if !\IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'discover' ) ) }}class='ipsHide'{{endif}}>
        <a class='ipsType_light' href='{url="discover" seoTemplate="all_activity"}'><i class='fa fa-refresh'></i></a>
    </li>
{{endif}}

 

Archived

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

  • Recently Browsing   0 members

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