XF 1.5 Xen Coding For Thread Links

I've searched and can't find how to make this work:
Code:
<a href="{xen:link 'threads', $thread}">Link to thread</a>
We using the following on a template, but it keeps link to the index page instead of the thread:
Code:
<a href="{xen:link 'threads', 10064}">Link to thread</a>
We even tried this, but it links to an error page:
Code:
<a href="{xen:link 'threads', $thread.10064}">Link to thread</a>
UPDATE
Think we figured it out. This seems to work:
Code:
<a href="{xen:link 'threads',  $thread, 'thread_id=10064'}">Link to thread</a>
 
Last edited:

Ralle

Active member
It looks to me like your $thread is not an instance of XF\Entity\Thread. Your solution is not necessary if you have the proper thread object.
 
Top