如何找到果园资源 [英] How to locate resources in Orchard

查看:186
本文介绍了如何找到果园资源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写一个果园的主题,我希望能够找到一些与主题(图片/ SWF文件等)打包资源。

I am writing an Orchard theme, and I'd like to be able to locate some of the resources packaged with the theme (images/swfs etc).

什么是这样做的最佳方式?

What is the best way of doing this?

我看了一下ResourceManifest文件,使用builder.Add.DefineResource但我似乎无法找到它的视图中的对应。
或者,我只是把完整路径?

I've had a look at ResourceManifest files, using builder.Add.DefineResource but I can't seem to find it's counterpart in the view. Or do I just put the full path in?

任何提示?

干杯
卡尔

推荐答案

在样式表,相对路径(从样式表路径)应该被使用。

In stylesheets, relative paths (from the stylesheet path) should be used.

在视图中,您应该使用Url.Content。

In views, you should use Url.Content.

这篇关于如何找到果园资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆