Go directly to the latest post in the forums thread after submitting a new post/reply

   —   
The default behavior that occurs after submitting a new post/reply is, the whole page gets refreshed and it goes to the top of the forums page.  This article describes how to change the default behavior, so the page will load the latest post in the forum, after the page is refreshed.
It’s pretty easy, and you will just need to change two lines in two seperate files.

The first change has to be done in the following file:
~\CMSModules\Forums\Controls\Layouts\Flat\Thread.ascx

Locate and modify line 69:
<td style="border: medium none; padding: 0px 5px;" colspan="2"><a name='<%#Eval("PostId")%>'></a>

And the second file to modify is:
~\CMSModules\Forums\Controls\NewPost.ascx.cs

Locate and modify line 1023:
URLHelper.Redirect(ClearURL()+"#"+fp.PostId);



Applies to: Kentico 7.x
Share this article on   LinkedIn

Martin Danko

Let me guide you on your journey of success. I will show you how to optimize your content production with Kentico Draft. Check out www.kenticocloud.com