Jump to content

mobile navbar - better performance?

Featured Replies

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

  • Management

I'm not sure what you mean here. By performance do you mean loading time or something else?

  • Author

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

  • No registered users viewing this page.