在orchard cms局部视图中包含脚本?

时间:2014-05-16 13:30:35

标签: asp.net-mvc orchardcms orchard-modules

我在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 />
}

但是它不会只是空白的视图? 如果我删除脚本头和脚,一切正常吗? 问题在哪里?

0 个答案:

没有答案