Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Thomas P Posted February 27, 2018 Posted February 27, 2018 Hi mates, how can I insert code, which should only show on topic pages? I have to insert code to the footer of the topic pages... Thanks in advance, Thomas
Adriano Faria Posted February 27, 2018 Posted February 27, 2018 Something like: {{if \IPS\Request::i()->app == 'forums' and \IPS\Request::i()->module == 'forums' and \IPS\Request::i()->controller == 'topic'}} Show your stuff {{endif}}
Thomas P Posted February 27, 2018 Author Posted February 27, 2018 Thanks, Adriano - that works. Could you please tell me, if this works, too? {{if \IPS\Request::i()->app == 'forums' and \IPS\Request::i()->controller == 'topic'}} mystuff {{endif}}
Adriano Faria Posted February 27, 2018 Posted February 27, 2018 Yes, it works but if it has another controller called topic in a module different than forums, it will show too.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.