I have to controls on the page
messageboardviewer - for viewing messages
messageboard - for adding messages
i have it set up so if the user is authenticated it will display the viewer and the board for them to post
if not it just displays the post for that particular article.
The problem i'm having is setting the viewer to only show messages related to that article page that it is on. at the moment if i post in article1 the post will show up in all article pages!!
here is my code
<%@ Register Src="~/CMSWebParts/MessageBoards/MessageBoard.ascx" TagName="MessageBoard" TagPrefix="uc1" %>
<%@ Register Src="~/CMSWebParts/MessageBoards/MessageBoardViewer.ascx" TagName="MessageBoardViewer" TagPrefix="uc1" %>
<div id="comments" style="clear:both; float:left">
<uc1:MessageBoardViewer ID="MessageBoardViewer1" runat="server" Enabled="true" DisplayOnlyApproved="true" ZeroRowsText="No Messages in viewer" TransformationName="Community.Transformations.MessageBoard" AlternatingItemTransformationName="Community.Transformations.MessageBoard"></uc1:MessageBoardViewer>
<uc1:MessageBoard ID="MessageBoard1" BoardModerated="true" runat="server" BoardAccess="AuthenticatedUsers" BoardOpened="true" DisplayToRoles="_authenticated_" BoardRequireEmails="false" BoardEnableSubscriptions="true" ></uc1:MessageBoard>
</div>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
dr = CMS.CMSHelper.CMSContext.CurrentDocument.DataRow;
if (!DataHelper.DataSourceIsEmpty(dr))
{
MessageBoard1.BoardDisplayName = dr["Title"].ToString() +"(" + dr["NodeAliasPath"].ToString() + ")";
}
}
}