1

According to the answer provided by REMESQ on this question: Is it possible to use razor layouts with Orchard CMS and bypass the theming I was able to have separate layout and pages for a module bypassing Orchard's themes and layouts. But having problem referencing the cs,js script files (located in different folders of the module). Getting 404 NotFound error.

I tried referancing in the following way: @Script.Include("~/Scripts/jquery-1.9.1.js")

But cant get the correct reference path rendered attached picture

4

2 回答 2

1

如果以这种方式编写它可以工作:

<link href="~/Modules/ModuleName/Styles/site.css" rel="stylesheet" type="text/css" />

对于 html 中的图片标签,我们可以这样写:

<img alt="" src="~/Modules/ModuleName/Styles/images/for-rent.jpg" />
于 2013-06-25T18:02:24.620 回答
1

您的 URL 错误 - 它应该是:

  • jquery-1.9.1.js. 没有前导波浪号和Scripts/. Orchard 将确保最终 URL 将指向/Scripts您当前模块中的文件夹,或者
  • ~/Modules/Your.Module/Scripts/jquery-1.9.1.js
于 2013-06-24T10:36:57.853 回答