Mono Support How to show Discussion Board description under the Board Title 

Viewed 19877 time(s), 3 post(s), 12/16/2014 1:21:52 PM - by panos.pag
12/16/2014 1:21:52 PM
390 Reputation 35 Total posts

Hi,

When showing the Discussion Topics page we can see the Board Title and then some buttons (back to all discussion boards, options, etc.)
The code for displaying the board title is this: 

<h1><asp:Literal ID="labTitle" runat="server"></asp:Literal></h1>
If I would like to display the board description under the title, could you tell me what is the code that I should use?

Thank you in advance,
Panos

1
12/16/2014 1:24:04 PM
2793 Reputation 345 Total posts

I was surprised to see such markup, seems the code to set the Title is hardcoded in the code-behind instead of being inside the ASPX (get it from the object that represents the currently viewed discussion board - how do we get that object inside the ASPX markup to ask it for its Description property? [guess it has such, since at board options UI you can add a description])

2
12/17/2014 3:47:38 PM
3016 Reputation 428 Total posts

Hi Panos,

I assume that you do not have Mono source code? In that scenario you need to change the DiscussionTopic.htm template. You need to add description tag. An example:

<p><# Description #></p>
Also, you need to extend DiscussonTopic.ascx control, override   ParseTemplate Tags method and add your additional description tag:

protected override Hashtable ParseTemplateTags(SnDiscussionTopicEntity discussionTopic, VelocityContext velocityContext)
        {
            Hashtable existingTags = base.ParseTemplateTags(discussionTopic, velocityContext);
 
            existingTags.Add("<# Description #>", "Soem description");
        }
Regards.

3
This is a demo site for MonoX. Please visit Mono Software for more info.