Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Issue with multiple forum web parts on one page View modes: 
User avatar
Member
Member
sfbrown-hcso.tampa.fl - 2/15/2011 8:44:28 AM
   
Issue with multiple forum web parts on one page
Greetings,

I ran into an issue with having multiple forum web parts on a page. The result of having more than one is that only the first one is displayed. If the web parts are swapped in order, whichever one is first is the one that displays. The other does not appear at all.

I traced the issue to the ForumDivider class. It appears that the code is setup to turn off other parts under certain conditions. Unfortunately the code is not well documented at that point and so it is difficult to understand why this is done.

I tried removing the code in question and was able to get both forum web parts to appear with no apparent side effects. The code appears around line 374 and looks like the following...
                // Forum
else if (startingMode == 1)
{
ForumContext.DisplayOnlyMe(this);
}


Anyone have an explanation as to why this code turns off other web parts? Did it perhaps turn of things that it shouldn't have? Can I safely comment that line out?

Thanks in advance...

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 2/21/2011 2:18:15 AM
   
RE:Issue with multiple forum web parts on one page
Hello,

To display multiple forums on one page please use the Forums group webpart. This is the recommended approach on displaying multiple forums. Altering the default files isn't recommended for obvious reasons.

Best regards,
Boris Pocatko

User avatar
Member
Member
sfbrown-hcso.tampa.fl - 3/1/2011 2:11:33 PM
   
RE:Issue with multiple forum web parts on one page
The Forum group webpart will not achieve what we are looking to do. Basically, we want on a web page to show the 5 most recent posts from 2 seperate forums and those forums are in seperate forum groups. The forum group web part is used to display the forums from one group, not different forum groups.

User avatar
Member
Member
sfbrown-hcso.tampa.fl - 3/1/2011 2:14:54 PM
   
RE:Issue with multiple forum web parts on one page
Also, let me add this since I know the difference between forums and groups gets messed up sometimes.

We have group A. Inside group A we have
Forum 1
Forum 2
Forum 3

We have group B. Inside group B we have
Forum 4
Forum 5
Forum 6

What we want is to have on a page where one area of a page shows the 5 most recent postings from Forum 2 (we don't want the user to have to drill down)

On another part of the page we want to do the same thing but display Forum 5.

That is why I was using the forum view to select a specific forum and display some of the posting from that forum. I was just surprised that one forum view would mess up another forum view on the same page.

User avatar
Member
Member
Chanan - 3/2/2011 6:09:03 AM
   
RE:Issue with multiple forum web parts on one page
I had a similar issue where I needed to show the most recent post in a forum and not the whole group.

To solve it, I used the ForumDataSource and used a Basic Repeater pointing to the data source I created. You can do the same with two data sources and two basic repeaters. The transformation is called something like - Community Transformation -> ForumPostList - or of course you can create you own.

Hope that helps!

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 3/2/2011 9:41:25 AM
   
RE:Issue with multiple forum web parts on one page
Hello,

I've consulted your issue with our developer, and if deleteng the mentioned condision works then you can use the mentioned approach. However we don't guarantee, that there won't be any issues after that. Currently aren't multiple forum listings on one page supported. Chanan's workaround only fools the checking of this condition, so it is basically the same approach as deleting the condition itself.

Best regards,
Boris Pocatko