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?
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:
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.
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:
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.