During a recent demonstration I was preparing for a prospective client, I was given a requirement to show “tags” related to a particular forum thread to be shown in a new column in the forums home page.

As out of the box Adxstudio forum template was not providing this functionality, I had to edit the forum.aspx page found under MasterPortal/Areas/Forums/Pages/Forum.aspx. The out of the box forum page looks like the image below.

adxstudio forum template

Steps to Show Forum Thread Tags

Given below are the steps I followed to add a column with tags associated with each thread in the forums home page.

  1. I opened up the MasterPortal solution of Adxstudio in Visual Studio 2015. Usually, the solution is found at the below location.

“<adxstudio installed drive>\Program Filex(x86)\XrmPortals\<adxstudioversion>\Samples\”

adxstudio masterportal

  1. Open the Forum.aspx found inside the folder “MasterPortal/Areas/Forums/Pages/”.

adxstudio forum aspx

  1. Navigate in the code to find the asp:ListView with ID “ForumThreads”, you’d be able to easily figure out this as the correct one to edit by inspecting the column headers in the List of forum threads (Thread, Author, Last Post, Replies).

adxstudio forum code

 

Add the following <th> tag to the code after the <th> tag which creates the ‘Replies’ column.

 

  1. Now let’s find out the place where we need to create the column contents in the code.

adxstudio forum code 2

 

  1. Insert a new <td> tag with the following content.

 

  1. All done, now let’s compile the code and recycle the application pool in IIS to inspect the outcome.

adxstudio application pools

  1. Notice the newly created “Tags” column right after the “Replies” column.

adxstudio Forum Thread Tags

 

I hope this gave you an idea on how to create a new column with Tags associated with an Adxstudio forum thread. I will meet you soon with another blog post with a new challenge I faced and I how I got through with it. Till then. Happy Coding!!!!