0

我已尝试更新论坛主题如下,

EPiServer.Community.Forum.Topic topic = GetTopic();
EPiServer.Community.Forum.Topic topicClone = topic.CreateWritableClone() as EPiServer.Community.Forum.Topic;

UpdateForumTopic(topicClone);// Edit the forum topic (e.g. change body text etc.) 

topicClone.Changed = topic.Changed; // This could not be done as there is no setter
EPiServer.Community.Forum.ForumHandler.Instance.UpdateTopic(topicClone); // Updating the forum topic will set the Changed state to true

Changed但是,即使在更新主题后,我也需要保持状态。有没有办法做到这一点?


关于我的设置的附加信息:
EPiServer.Community - version=9.0.0
EPiServer.CommonFramework - version=9.0.1

4

1 回答 1

0

在保存 topicClone 之前尝试使用 ResetModified() 方法。参考https://world.episerver.com/documentation/Class-library/?documentId=cms/7.5/602FB741

于 2019-08-05T06:39:52.523 回答