XF 2.1 In templates, how do I link to pages? (Page type nodes?)

Stuart Wright

Well-known member
I have a link in a template
Code:
<a href="pages/trading-rules">Trading Rules</a>
which shows this URL in the browser:
Code:
https://xf2.avforums.com/pages/trading-rules
which is the correct URL for the page
(it's hidden behind a login as it's private).
But when clicked on the page on the website throws
Oops! We ran into some problems.
The requested page could not be found. (Code: invalid_action, controller: XF:page, action: TradingRules)

I get the same result if I use
Code:
<a href="{{ link('pages/trading-rules') }}">Trading Rules</a>

What's going wrong?
 
Top Bottom