November Happy Hour will be moved to Thursday December 5th.

Get the Club where the NewsBlog belongs to

Vote:
 

Hi.

Is it possible to the get the Club where the NewsBlog belongs to?

I used the BlogHandler to get the Blog but then it doesn't show any property related to the Club it belongs to.

Many Thanks in advanced

 

#47461
Jan 28, 2011 17:56
Vote:
 

Hi,

I'm afraid that EPiServer does not have any API to support this. I think possible workaround solution could be the attribute system. You can set an attribute named something like clubID for each NewsBlog whenever it was created, then retrieve the Club that the NewsBlog belongs to by that attribute later.

#48721
Feb 14, 2011 8:18
Vote:
 

I think Tien is wrong, at least when it comes to recent versions of Community/Relate.

Try this:

IEntity ownerEntity = ((IOwnable)blog).OwnedBy.Entity;
if (ownerEntity is EPiServer.Community.Club.Club) { ... }

#51630
Jun 17, 2011 15:56
This thread is locked and should be used for reference only. Please use the Legacy add-ons forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.