XF 2.1 How to load a forum node in template by id?

sajal

Active member
I have a forum-id in the template, and based on that I want to load a forum-node, so that I can create a URL to that forum.

Is there any helper or easy way to do this? Since to just achieve this, I don't want to override the class and pass it as a template parameter.
 
You can likely get away with something like {{ link('forums', {'node_id': $nodeId}) }}, but you'll incur a redirect from URL canonicalization since you aren't passing the title in.
 
Top Bottom