如何在Sitecore中模拟RenderSection?

时间:2015-08-18 10:16:14

标签: sitecore sitecore-mvc sitecore8

我知道sitecore mvc不支持RenderSection

是否可以使用Sitecore MVC模拟它?

我只想要特定页面的必需脚本。

当然我可以将它拆分为2个文件和View Rendering,但这似乎并不好。

1 个答案:

答案 0 :(得分:3)

这不是你可以轻易做到的事情。这就是为此创建适当的html助手。这是以前的StackOverflow问题,描述了如何实现它:

Using sections in Editor/Display templates

此文章也可以为您提供帮助:

http://tomkamphuis.blogspot.co.uk/2013/04/sitecore-and-mvc-rendersections.html

相关问题