Template for displaying a list of messages from the forum administrators. They are usually displayed above the forums list and located in forums.ascx.
Message list forming occurs with the help of ForumNotice tag. In this tag you can use the following tags:
- TopPart - top part of the message list;
- BottomPart - bottom part of the message list;
- Template - message template;
- EmptyList - this template appears when there are no messages.
In the Template tag of the ForumNotice tag you can use the following parameters:
| Template's part |
Description |
<%# Container.DateAsDateTime %> |
Gets the message date as DateTime object |
<%# Container.Date %> |
Gets the message date |
<%# Container.Text %> |
The notice |
Example of a forum list template file with administrator messages from modules/Forum/forums.ascx:
|
<%@ Control Language="c#" Inherits="CMSLib.Pages.SiteControl" %> <%@ Register TagPrefix="cmsf" Namespace="CMSLib.Modules.Forums" Assembly="CMSLib" %>
<cmsf:ForumNotice id="ForumNotice1" runat="server" > <TopPart> <table border="1"> <tr> <td>Date</td> <td>Text</td> </tr> </TopPart> <BottomPart> </table> </BottomPart> <Template> <tr> <td><%# Container.Date %></td> <td><%# Container.Text %></td> </tr> </Template>
<EmptyList> No messages. </EmptyList> </cmsf:ForumNotice>
<p> </p>
<cmsf:ForumsList id="ForumsList1" runat="server">
<TopPart> <table width="98%" cellpadding="1" cellspacing="1" bordercolor="black"> <tr> <td align="center" colspan="2">Forum name</td> <td align="center"><b>Subject</b></td> <td align="center"><b>Messages</b></td> <td align="center"><b>Last message</b></td> </tr> </TopPart>
<BottomPart>
</table> </BottomPart>
<MessageTemplate> <tr> <td align="center"><img src="modules/forum/signs/off.gif" width="22" height="15"></td> <td><a href="<%# Container.LinkToThreads %>" class="h5"> <%# Container.Name %></a><br /> <font class="small"><%# Container.Desc %></font></td> <td align="center"><%# Container.NumberThreads %></td> <td align="center"><%# Container.NumberMessages %></td> <td align="center"><a href="<%# Container.LinkToLastMessage %>" class="link"> <%# Container.LastMessage %> (<%# Container.LastMessageAuthorName %>) <%# Container.LastMessageDate %> <%# Container.LastMessageTime %> </a> </td> </tr> <tr><td colspan="5" height="2"></td></tr> </MessageTemplate> </cmsf:ForumsList> |
Modules: Forum | Forums list | Threads
© 2005-2007 Astron Digital Ltd. All Rights Reserved.