You are here: Home >> How-Tos >> Full thread navigation solution

How-To: Full thread navigation solution

By Mark Morgan

On a lot of threaded discussion boards, at the bottom of each message is the full thread of the message, for navigation purposes. Usually with a an indicator showing where you are at in the thread.

While I haven't figured out how to show an indicator, I was able to show the full thread of a message below each message, courtesy the flexibility of Conversant's message macros.

Step one: create a new reply template

Go to the template section of the conversation's admin system (YourSiteURL/admin/conversations/ConvID/templates). Click on the "create" tab. Give your new template a name (I called mine "Full thread navigation", but you can call it whatever you want. The rest of these instructions assume that name.) Leave the "based on" dropdown at None, and click "Create Template",

In the blank field of your template, put the following code:

<!--#msgIndentation--><a href="/<!--#msgNum-->"><!--#msgSubject--></a> by <!--#msgCreatorName--><br>
<!--#msgIndentation--><i><!--#msgBody cliplength="100"--></i>

(Fiddle to your heart's content, especially the cliplength parameter--I like long clips.)

In the dropdown menu next to "type" choose "DG message". Click the "Save Template" button at the bottom.

Step two: Add some code to your message template:

Now, click on the Edit tab and click on the name of the template you use to control the look of your messages (the default name is "Styled Message Viewing"--if you've changed it, you know you have).

Wherever you want the full thread navigation to appear, add the following code:

<a href="/<!--#msgNum msgNum="top"-->"><!--#msgSubject msgNum="top"--></a> by <!--#msgCreatorName msgNum="top"--><br>
<i><!--#msgBody msgNum="top" cliplength="100"--></i><p>
<!--#msgReplies msgNum="top" template="Full thread navigation" depth="infinity"-->

Notice how those first two lines are the same as the previous step's coding, with the msgNum="top" parameter on all the coding. What's happening is that the page is now showing the entire reply thread for the top messaage in the thread. But it won't show the code for the top message, so that's added separately here. Any changes you make to the appearance of the template in the first step you should duplicate in the first two lines of the second step.

Have fun with it.


QuickStart
Main Menu
Discussion

Guests
Welcome!
  • Sign Up
  • Logon

  • Search


    This site managed with Conversant, © Copyright 2008 Macrobyte Resources; Unless otherwise stated, content © 2000 - 2005 Mark Morgan
    Site design adapted from a free template at Free Site Templates.