Hello
I have an editable text field that I manipulate with API at a web part page load event:
PageInfo pi = PageInfoProvider.GetPageInfo(CMSContext.CurrentDocument.DocumentGUID);
string TheContent = pi.EditableWebParts["editabletext"];
// Manipulate content here
pi.EditableWebParts["editabletext"] = TheContent;
TreeProvider tr = new TreeProvider();
TreeNode tn = tr.SelectSingleNode(CMSContext.CurrentDocument.DocumentID);
// Update the content XML
tn.SetValue("DocumentContent", pi.DocumentContent);
// Update the document
DocumentHelper.UpdateDocument(tn, tr);
I can see the manipulated text in preview mode only. I assumed I had a caching problem. So after saving the document I tried all cachine clearing methods I could find:
CMS.GlobalHelper.CacheHelper.ClearOutputCache(CMSContext.CurrentSiteID, CMSContext.CurrentPageInfo.NodeAliasPath, CMSContext.CurrentDocument.DocumentCulture, true, true);
CMS.GlobalHelper.CacheHelper.ClearFullPageCache();
CMS.GlobalHelper.CacheHelper.ClearPartialCache();
Clearing the cache did not help.
Any ideas?
Thank you!
Norm