1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Getting the forum URL in a template

Discussion in 'XenForo Development Discussions' started by AndyB, Oct 17, 2013.

  1. AndyB

    AndyB Well-Known Member

    This template code block almost works:

      <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>
    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.
  2. AndyB

    AndyB Well-Known Member

    Figured out the problem. The query I used to populate $threads was missing the select for node_id.

Share This Page