Forum topics pagination and posts anchors |
(03-13-2015, 12:27 PM)hedi Wrote: I cannot imagine a way to make your example work : http://base_url/thread/{threadID}/post/{...pid{postID} The controller should determine which page needs to be displayed to display the requested post based on the current settings for the pager. The page shouldn't need to be passed in the URL, because the only thing that matters is that the post is displayed. For example, if the post is the 21st post in that particular thread and the pager is setup for 20 posts per page, you would display the second page. However, if the pager is changed to display 25 posts per page, you would display the first page. Since you're linking to a post, you don't reference the paging in the URL, otherwise your "perma-links" are no longer valid when the paging changes. Quote:Sorry if i don't understand you but: In my example, if postID is 5, the end of the URL is /post/5#pid5. The difference is that there is something between the last / and the #. The post targeting might still work in your example, but it's dependent on the browser. The browser (or other tools used by the end-user) may not interpret the URL in your example properly, and it is possible that a link to http://example.com/forum/forum-slug/topic-slug/#35 would not work from the page displayed by going to http://example.com/forum/forum-slug/topic-slug/#5 (assuming the paging is setup for fewer than 30 posts per page), because the URL indicates that both posts are on the same page. |
Messages In This Thread |
Forum topics pagination and posts anchors - by hedi - 03-12-2015, 01:44 AM
RE: Forum topics pagination and posts anchors - by mwhitney - 03-12-2015, 09:43 AM
RE: Forum topics pagination and posts anchors - by hedi - 03-12-2015, 10:49 AM
RE: Forum topics pagination and posts anchors - by mwhitney - 03-13-2015, 11:59 AM
RE: Forum topics pagination and posts anchors - by hedi - 03-13-2015, 12:27 PM
RE: Forum topics pagination and posts anchors - by mwhitney - 03-16-2015, 12:26 PM
|