Umbraco中根据ID来获取IPublishedContent

在Umbraco网站上的 https://our.umbraco.com/documentation/Reference/Templating/Mvc/querying 可以看到基本的信息

这里我们再结合项目开发中情况详细说一下

通常的做法是

var umbracoHelper = new UmbracoHelper(UmbracoContext.Current);
IPublishedContent content = umbracoHelper.TypedContent(nodeId);
05-18 21:10