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