sound Posted May 27, 2017 Share Posted May 27, 2017 {{$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 Link to comment Share on other sites More sharing options...
Management Charles Posted May 27, 2017 Management Share Posted May 27, 2017 I'm not sure what you mean here. By performance do you mean loading time or something else? Link to comment Share on other sites More sharing options...
sound Posted May 27, 2017 Author Share Posted May 27, 2017 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.