我在 Orchard CMS 中有一些包含的部分视图,问题是当我使用脚本包含页面时,页面没有加载?
这是我的partilla视图,称为
列表-ProjectionWidget.cshtml
@using Orchard.Mvc.Html;
@using Orchard.UI.Resources;
@using (Script.Head()) {
<style type="text/css">
.featureSlider li { height:@(Model.Group.GroupHeight)px; width:@(Model.Group.GroupWidth)px; background-color:@(backgroundColor); }
.featureSlider li h2, .featureSlider li h3, .featureSlider li h2 a, .featureSlider l1 p.slideNumbers { color:@(foregroundColor) !important; }
.featureSlider li span { width:@(Model.Group.ImageWidth)px; height:@(Model.Group.ImageHeight)px; }
.featureSlider li span img, .featureSlider li span a img { width:@(Model.Group.ImageWidth)px; height:@(Model.Group.ImageHeight)px; }
div#slideNav a.activeSlide { background-color: @(foregroundColor); }
.featureSlider li p { position: relative; top:@(Model.Group.GroupHeight - 25)px; }
.headline { padding-top: @(Model.Group.HeadlineOffsetTop)px; }
.headline, .headline + h3 { padding-left: @(Model.Group.HeadlineOffsetLeft)px; }
</style>
}
using (Script.Foot())
{
}
@foreach(var item in Model)
{
string text = System.Text.RegularExpressions.Regex.Replace(item.ContentItem.BodyPart.Text, "<.*?>", string.Empty);
@text
<br />
foreach(var sub in item.ContentItem.SliderItem.Picture.MediaParts)
{
@sub.MediaUrl <br />
}
@item.ContentItem.SliderItem.Link.Value <br />
@item.ContentItem.SliderItem.Link.Text <br />
<br />
}
但它不会让视图只有空白吗?如果我删除脚本头和脚,一切正常吗?问题出在哪里?