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

Subscription

Vote:
 
Hi, When a user want to subscribe to our newsletter, I want to the user to subscribe to every section automatically. I've manage to do this, but the performance is too slow because we have a lot of pages in EPiServer. Is there perhaps a better way of achieving the same functionality? e.g. somehow using the SubscriptionList Please see my code below: // subscribe to all PageDataCollection colPages = new PageDataCollection(); PropertyCriteriaCollection col = new PropertyCriteriaCollection(); PropertyCriteria crForm = new PropertyCriteria(); crForm.Type = PropertyDataType.Boolean; crForm.Condition = CompareCondition.Equal; crForm.Name = "EPSUBSCRIBE"; crForm.Value = "true"; col.Add(crForm); colPages = Global.EPDataFactory.FindPagesWithCriteria(EPiServer.Global.EPConfig.StartPage,col); // searching through the entire site!! SubscriptionInfo info = new SubscriptionInfo(savedUser); for (int i=0; i < colPages.Count; i++) { info.SubscribeTo(colPages[i].PageLink); } Thanks, Danie
#12806
Oct 12, 2006 13:22
* 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.