MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

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

20493 put(a) pogledan, 3 odgovor(a) 16.12.2014. 13:21:52Kreirao(la) panos.pag
panos-pag

panos.pag

16.12.2014. 13:21:52
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
Ovaj sadržaj još nije ocijenjen. 
390 Reputacija 35 Ukupno objava
Zoomicon

Zoomicon

16.12.2014. 13:24:04
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])
Ovaj sadržaj još nije ocijenjen. 
2793 Reputacija 345 Ukupno objava
imarusic

imarusic

17.12.2014. 15:47:38
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.

Ovaj sadržaj još nije ocijenjen. 
3016 Reputacija 428 Ukupno objava