大家好,从过去的几个小时开始,我正在尝试发布一个文档,并且我正在设置一些自定义数据类型值,因为我正在保存序列化值:在 umbraco 中,数据类型值仅在数据库和 umbraco.config 文件中可用发布文档,所以在我的自定义文档类型中,我有一个名为添加用户的按钮,我想在调用此按钮时将其保存在数据库中,我需要发布我正在使用的文档:
//Get the document by it's ID
Document d = new Document(currentDocID);
//Mark it ready for publishing
d.Publish(new umbraco.BusinessLogic.User(0));
//Tell the runtime to update the document cache
umbraco.library.UpdateDocumentCache(d.Id);
//call republishing from the api:
umbraco.library.RefreshContent();
//Server.ScriptTimeout = 100000;
//umbraco.cms.businesslogic.web.Document.RePublishAll();
//umbraco.library.RefreshContent();
但它无法更改 Umbraco.config 文件和数据库文件,而如果通过单击在 umbraco 中发布,数据将保存在 umbraco db 和配置文件中。我无法弄清楚我错过了什么..