Jump to content

mobile navbar - better performance?


sound

Recommended Posts

Posted
{{$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>

 

for better performance in mobile view should  defaultstream() only be called AFTER the 'canaccessmodule' check ?

eg move it into the if endif

Posted

thanks for the reply

am meaning performance as in loading time

the software is currently  calling and  running   'defaultstream()'  on every mobile page load even if the member has no permission to view the activity screen

Archived

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

  • Recently Browsing   0 members

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