Template for displaying a threads list of some forum (located in threads.ascx). Here it is tuned how every single forum thread is displayed.
In a ThreadList tag you can use the following tags:
- TopPart - threads list top part;
- BottomPart - threads list bottom part;
- MessageTemplate - forum’s information template.
In the TopPart and BottomPart tags of the ThreadList tag you can use the following parameters:
| Template's part |
Description |
<%# Container.ThreadName %> |
Tread's name |
<%# Container.PagingLinks %> |
The paging links |
In the MessageTemplate tag of the ThreadList tag you can use the following parameters:
| Template's part |
Description |
<%# Container.Subject %> |
Forum thread name |
<%# Container.NumberViews %> |
The number of thread's views |
<%# Container.NumberMessages %> |
The number of messages in the forum |
| <%# Container.IconTag %> |
The icon tag to display message icon |
| <%# Container.IsCurrentUserAdmin %> |
Whether this instance is current user admin |
| <%# Container.LastMessageDateTime %> |
The date and time of the last message on the forum |
| <%# Container.LastMessageDate %> |
Date of last message on the forum |
| <%# Container.LastMessageTime %> |
Time of last message on the forum. |
| <%# Container.LastMessage %> |
The quote of last message |
| <%# Container.LastMessageAuthorName %> |
Last message author |
| <%# Container.GetEditThreadLink(string cssClass) %> |
Get the edit thread link |
A template file is located in module/Forum/threads.ascx and can look as follows:
|
<%@ Control Language="c#" Inherits="CMSLib.Pages.SiteControl" %> <%@ Register TagPrefix="cmsf" Namespace="CMSLib.Modules.Forums" Assembly="CMSLib" %>
<cmsf:ForumPathMenu id="ForumPathMenu1" runat=server /> <cmsf:ForumContextMenu id="ForumContextMenu1" runat="server" />
<cmsf:ThreadList id="ThreadList1" runat="server"> <TopPart> <table border=0 width="98%" cellpadding="3" cellspacing="1"> <tr bgcolor="#89C489"> <td align="center" colspan="3">Subject</td> <td align="center">Last message</td> <td align="center">Answers</td> <td align="center">View</td> </tr> </TopPart> <BottomPart> <tr> <td colspan=6> <table> <tr> <td><%# Container.PagingLinks %></td> </tr> </table> </td> </tr> </table> </BottomPart> <MessageTemplate> <tr> <td width="20px" align="center"> <img src="Modules/Forum/signs/old.gif"> </td> <td align="center"><%# Container.IconTag %></td> <td><a href=<%# Container.PahtToThreadMessages %> class="h5"><%# Container.Subject %></a></td> <td align="center"><a href=<%# Container.PahtToLastThreadMessages %>><%# Container.LastMessage %> (<%# Container.LastMessageAuthorName %>) <%# Container.LastMessageDate %> <%# Container.LastMessageTime %></a></td> <td align="center"><%# Container.NumberMessages %></td> <td align="center"><%# Container.NumberViews %></td> <td><a href="<%# Container.EditThreadLink %>">Edit</a></td> </tr> <tr> <td colspan="6" height="2"></td> </tr> </MessageTemplate> </cmsf:ThreadList>
|
Modules: Modules | Forum | Forums list | Message list | Message edit form
AuthorizationForms: User data page
© 2005-2007 Astron Digital Ltd. All Rights Reserved.