In this Discussion

How to have original post at top of all comments pages?

If I go to a thread, the original post is shown at the top with the comments underneath. However, if there are enough comments to have multiple pages, if I go to Page 2 or 3 etc, the original post is no longer shown at the top.

I'd like the original post to stay at the top for all comment pages. The reason for this is that if somebody lands on Page 2+, they may not see what the original discussion was about without clicking back through to Page 1.

Thanks for the quick reply. I'm not afraid to code (but I'm no expert!), I used to run a myBB forum and heavily customised the php - though Vanilla appears to have a different set up, using tpl templates etc. I'll have a poke around and see what I can do.

It might help you understand what is happening (after you have read the developer documentation)

After that, think about the code above:
"If this is page one, print out discussion, if not print a closing div".

Your method now should check the same and if this is page one, you do not have to do anything, but if this is not page one, you should take the above actions.

A few hints on that:

$this is passed to your method as first element and is refenced with the word $sender by convention

if you want to fetViewLocation from a plugin, you need to use it like that: include $sender->fetchViewLocation('discussion', 'discussions', 'vanilla')

you shouldn't echo that closing div, because that will be done by the if clause from above anyway

don't forget to fire the AfterDiscussion event. Otherwise some additions made by other plugins will not work on the discussions that are printed out by you. You can emit that event like that $sender->fireAs('DiscussionController')->fireEvent(AfterDiscussion');