I have a couple of providers created using smartform:
ID Title 90 Doctor A 102 Doctor B 10 Doctor C 26 Doctor D 495 Doctor E
I have three collections in CMS:
ID Title of Collection 12 IM Collection 43 UR Collection 9 EC Collection
The following code retrieves the contents for a collection that works for me:
ContentManager contentManager = new ContentManager(); ContentCollectionCriteria criteria = new ContentCollectionCriteria(ContentProperty.Id, EkEnumeration.OrderByDirection.Ascending); criteria.AddFilter(Convert.ToInt64(ddlCollection.SelectedValue)); List<ContentData> contentList = contentManager.GetList(criteria);
I will include the following variable:
iPName (int) = the provider ID sColl (List<string>) = The collection(s) the provider should go in
How can I encode a recursive function for each provider that takes iPName, remove it from any collection that the provider has, and use sCol to add the provider to the collection.
source share