Mr Lucky
Well-known member
In forum_view template I wish to move the post thread button to replace the page navigation. This should be easy shouldn't it?
![post_thread.webp post_thread.webp](https://xenforo.com/community/data/attachments/305/305027-c5ec2e551ced2ec6d56d47441c58602f.jpg?hash=o8EM-F0hlO)
The code for the button is
And I remove the pagenav and move button to the same position as the pagenav was
But it only works if I remove the page action (shown in red), so then I do get what I want:
![Screenshot 2024-07-14 at 11.00.54.webp Screenshot 2024-07-14 at 11.00.54.webp](https://xenforo.com/community/data/attachments/305/305029-3a945acd3079e4b900402c0d1037953c.jpg?hash=THuoZh87qx)
BUT
If I don't remove page action the button just shows in its original position.
The problem is if I just move the button code it obviously no longer respects the permissions applied by the page action.
If I put the button code inside a conditional e.g.
Does anyone please know how to solve this, thanks.
![post_thread.webp post_thread.webp](https://xenforo.com/community/data/attachments/305/305027-c5ec2e551ced2ec6d56d47441c58602f.jpg?hash=o8EM-F0hlO)
The code for the button is
Rich (BB code):
<xf:pageaction if="$forum.canCreateThread() OR $forum.canCreateThreadPreReg()">
<xf:button href="{{ link('forums/post-thread', $forum) }}" class="button--cta" icon="write" rel="nofollow">
{{ phrase('post_thread') }}
</xf:button>
</xf:pageaction>
And I remove the pagenav and move button to the same position as the pagenav was
Rich (BB code):
<div class="block-outer"><xf:trim>
<xf:pageaction if="$forum.canCreateThread() OR $forum.canCreateThreadPreReg()">
<xf:button href="{{ link('forums/post-thread', $forum) }}" class="button--cta" icon="write" rel="nofollow">
{{ phrase('post_thread') }}
</xf:button>
</xf:pageaction>
But it only works if I remove the page action (shown in red), so then I do get what I want:
![Screenshot 2024-07-14 at 11.00.54.webp Screenshot 2024-07-14 at 11.00.54.webp](https://xenforo.com/community/data/attachments/305/305029-3a945acd3079e4b900402c0d1037953c.jpg?hash=THuoZh87qx)
BUT
If I don't remove page action the button just shows in its original position.
The problem is if I just move the button code it obviously no longer respects the permissions applied by the page action.
If I put the button code inside a conditional e.g.
<xf:if is="{{$xf.visitor.isMemberOf(8)}}”>
to reapply permissions via usergroup I get an error.Line 55: Syntax error - Template name: public:forum_view
Does anyone please know how to solve this, thanks.