Jump to content

Show Code in Template - Only on Topic Pages?

Featured Replies

Posted

Hi mates,

how can I insert code, which should only show on topic pages? :unsure:

I have to insert code to the footer of the topic pages...

Thanks in advance,
Thomas

Topic pages? :unsure:

You mean articles?

  • Author

Sorry, I mean forum topics...

Something like:

{{if \IPS\Request::i()->app == 'forums' and \IPS\Request::i()->module == 'forums' and \IPS\Request::i()->controller == 'topic'}}
	Show your stuff
{{endif}}

 

  • Author

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}}

 

Yes, it works but if it has another controller called topic in a module different than forums, it will show too.

Archived

This topic is now archived and is closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.