XF 1.4 Adding Page Anchors to Pagination Links

SurferJon

Active member
Hi, I'm trying to add #page-anchors to the end of the pagination links on thread pages. As in, when you click the numbers, they'll have the #page-anchor I specify at the end of each link. Does anyone know how I can do this with the pagination bit:

Code:
            <xen:pagenav link="threads" linkdata="{$thread}"
                page="{$page}" perpage="{$postsPerPage}" total="{$replycountxfwp}"
                unreadlink="{$unreadLink}"
            />

Thank you!
 
Hi Brogan! I paid a programmer to build a custom XF/WordPress integration where the story's forum thread is underneath my news story. When they click from thread page to thread page, I'm trying to have page anchors so it jumps down to the pagination/thread rather than reload to the top of the page where the news story is. All I need to figure out is how to append #page-anchor to the end of each page link, that's all.
 
This code generates the pagination on a thread page (the numbers you click to go from thread page to thread page):
Code:
<xen:pagenav link="threads" linkdata="{$thread}" page="{$page}" perpage="{$postsPerPage}" total="$replycountxfwp}" unreadlink="{$unreadLink}" />
So for example, each number is a link like this:
https://xenforo.com/community/threa...4-more-assorted-improvements.79604/page-5

What I want to do is add a page anchor to the end of the link, like this:
https://xenforo.com/community/threa...4-more-assorted-improvements.79604/page-5#top

But simply adding "#top" to the above code breaks the links. :( Does anyone have any ideas on how I can add this to the end of each of those links? Thank you!
 
This code generates the pagination on a thread page (the numbers you click to go from thread page to thread page):
Code:
<xen:pagenav link="threads" linkdata="{$thread}" page="{$page}" perpage="{$postsPerPage}" total="$replycountxfwp}" unreadlink="{$unreadLink}" />
So for example, each number is a link like this:
https://xenforo.com/community/threa...4-more-assorted-improvements.79604/page-5

What I want to do is add a page anchor to the end of the link, like this:
https://xenforo.com/community/threa...4-more-assorted-improvements.79604/page-5#top

But simply adding "#top" to the above code breaks the links. :( Does anyone have any ideas on how I can add this to the end of each of those links? Thank you!
When i clicked the example link with #top, the link works & opened in the browser.
Or did i miss something? :)
 
Top Bottom