gizmodo Posted January 6, 2016 Share Posted January 6, 2016 Hello, Can you please help with the following : The below code : <if test="ipsRegistry::$current_application == 'nexus'"> {advertisement="ad_global_header"} </if> no longer works on IPS4. What is the corresponding one on IPS4? On previous versions, it worked fine. What is the condition for checking if current application is nexus? Thanks in advance. Link to comment Share on other sites More sharing options...
Stuart Silvester Posted January 6, 2016 Share Posted January 6, 2016 11 minutes ago, gizmodo said: Hello, Can you please help with the following : The below code : <if test="ipsRegistry::$current_application == 'nexus'"> {advertisement="ad_global_header"} </if> no longer works on IPS4. What is the corresponding one on IPS4? On previous versions, it worked fine. What is the condition for checking if current application is nexus? Thanks in advance. I would recommend reviewing the new template syntax for IPS4: https://community.invisionpower.com/4guides/themes-and-customizations/template-syntax/ Link to comment Share on other sites More sharing options...
gizmodo Posted January 7, 2016 Author Share Posted January 7, 2016 Hello, Yes, I've checked the documentation for the new syntax. What I've not found is the condition to check if current application is nexus. Previously the following worked : test="ipsRegistry::$current_application == 'nexus'" but on IPS4, it doesn't. What is the corresponding code on IPS4? Thanks Link to comment Share on other sites More sharing options...
Marcher Technologies Posted January 7, 2016 Share Posted January 7, 2016 {{if \IPS\Dispatcher\Front::i()->application->directory == 'nexus'}} {advertisement="ad_global_header"} {{endif}} Link to comment Share on other sites More sharing options...
gizmodo Posted January 7, 2016 Author Share Posted January 7, 2016 Thanks a lot Marcher That's exactly what I was looking for. Working on latest version. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.