<%~if not tagged_threads.length%><%~set tagged_threads = GForum::ThreadTag::generate_threadtags()%><%endif%>
<%~if tagged_threads.length%>
<div class="widget hot-topics">
  <a href="#" rel="hottopic" class="hotlnk">Hot Forum Topics <span class="sprite-arrow-down-b"></span></a>
  <div class="tagwidget">
    <ul>
      <%~loop tagged_threads%>
      <li>
        <a href="#" class="cat"><%group_name%><i class="sprite-expand"></i></a>
        <div class="children">
          <ul>
          <%~loop groups%>
            <li>
              <a href="#"><%group_name%></a>
              <ul>
                <%~loop threads%>
                <li class="thread"><span class="sprite-single-thread"></span> <a href="<%GForum::SEO::url(type => "post", id => $post_id)%>"><%post_subject%></a></li>
                <%~endloop%>
              </ul>
            </li>
          <%~endloop%>
          </ul>
        </div>
      </li>
      <%~endloop%>
    </ul>
  </div>
</div>
<%~endif%>
