Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > CMS.Community.CommunityContext.CurrentGroup.GroupName returns null View modes: 
User avatar
Member
Member
Alex - 4/7/2010 8:11:53 AM
   
CMS.Community.CommunityContext.CurrentGroup.GroupName returns null
Hello!

I insert GroupMediaLibrariesViewer fot current group but can not view it

this code should get current group name but returns NULL
Why?

string GetGroupName() {
if (CMS.Community.CommunityContext.CurrentGroup != null) {
return CMS.Community.CommunityContext.CurrentGroup.GroupName;
}
return "";

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 4/8/2010 6:32:16 AM
   
RE:CMS.Community.CommunityContext.CurrentGroup.GroupName returns null
Hello,


it recognizes the current group according to URL query strings (API Reference: Current group info object matching groupid, groupguid or groupname specified in the URL parameter of the current request).

Could you please check if you have one of these query strings in URL? Thank you.


Best regards,
Helena Grulichova