Esempio n. 1
0
 protected void SetProperties()
 {
     PageBuilder p = Page as PageBuilder;
     if (cmsActivityFeed.TemplateUserProfile == string.Empty)
     {
         _contentApi = new ContentAPI();
         TemplateData[] userTemplate;
         userTemplate = _contentApi.GetCommunityTemplate(Ektron.Cms.Common.EkEnumeration.TemplateType.User);
         if (userTemplate != null)
         {
             for (int i = 0; i <= userTemplate.Length - 1; i++)
             {
                 if (userTemplate[i].SubType == EkEnumeration.TemplateSubType.Profile)
                 {
                     cmsActivityFeed.TemplateUserProfile = userTemplate[i].FileName.ToString();
                     cmsActivityFeed.ProfileParamName = "id";
                     break;
                 }
             }
         }
     }
     cmsActivityFeed.DefaultObjectID = ObjectId;
     cmsActivityFeed.ObjectType = (FeedType == "User") ? EkEnumeration.ActivityFeedType.User : EkEnumeration.ActivityFeedType.CommunityGroup;
     if (p == null && WidgetSpace.Scope == WidgetSpaceScope.CommunityGroup)
     {
         cmsActivityFeed.ObjectType = EkEnumeration.ActivityFeedType.CommunityGroup;
     }
     cmsActivityFeed.MaxResults = MaxResults;
 }