Joe Link
Well-known member
I'd like to add a close thread button to the thread view header.
I've tried this but I get the error message "This action is available via POST only. Please press the back button and try again".
	
	
	
		
I've also tried a traditional link and got the same error message.
	
	
	
		
Adding data-xf-click="switch" makes it work, but then it toggles between an open and close button (I only want a close button). Ideally the page would reload when the button is clicked.
				
			I've tried this but I get the error message "This action is available via POST only. Please press the back button and try again".
		Code:
	
	<xf:button class="button--primary" href="{{ link('threads/quick-close', $thread) }}">
    Close Thread
</xf:button>
	I've also tried a traditional link and got the same error message.
		Code:
	
	<xf:button class="button--primary" href="/quick-close">
    Close Thread
</xf:button>
	Adding data-xf-click="switch" makes it work, but then it toggles between an open and close button (I only want a close button). Ideally the page would reload when the button is clicked.