Hello, I finally figured out how to update the categories for a single blog entry by using this:
[WebMethod]
public string Update(int postId, string stuff)
{
var cs = ApplicationContext.Current.Services.ContentService;
var post = cs.GetById(postId);
post.SetValue("categories", stuff);
var status = cs.SaveAndPublishWithStatus(post);
return string.Format("updated post id {0}", post.Id);
}
How can I get a list of all Articulate blog entries (or even a filtered subset) and use a foreach loop to update the categories/tags by calling post.SetValue("categories", stuff)?
Update Blog Categories Programatically
Hello, I finally figured out how to update the categories for a single blog entry by using this:
How can I get a list of all Articulate blog entries (or even a filtered subset) and use a foreach loop to update the categories/tags by calling post.SetValue("categories", stuff)?
Kind regards.
is working on a reply...