Getting the forum URL in a template

AndyB

Well-known member
This template code block almost works:

Code:
  <xen:foreach loop="$threads" key="$index" value="$thread">
   
  <tr class="dataRow">
  <td><a href="{xen:link forums, $forum}" title="{$thread.nodetitle}" target="_blank">{$thread.nodetitle}</a></td>
  <td><a href="{xen:link threads, $thread}" title="{$thread.title}" target="_blank">{$thread.title}</a></td>
  </tr>
   
  </xen:foreach>

The forum name is displayed as a link, but each forum has the same forum_id number. The first forum is correct and clicking on the link takes you to the correct forum.

Thank you for any assistance.
 
Figured out the problem. The query I used to populate $threads was missing the select for node_id.
 
Top Bottom