Closed jean closed 8 years ago
In this case it's a snippet from the Orchard.Core
project referring to the Themes
module which is a core module and therefore and cannot be disabled:
I guess it's probably as safe as it gets.
I think what you're really getting at is how do you get a path out of the system for the current module / theme. I don't know. I've looked at a lot of modules and they have always either used relative paths (../Content/Images/Something.png
) or just given up and hard coded the module path in (~/modules/Some.Module/Content/Images/Something.png
). This was kind of safe in the past but a couple of versions ago custom module locations were introduced so the ~/modules/
portion of the path is not certain any more.
Thanks for raising the point, I would be interested in a proper answer if you come up with one but at the moment I'm going to close this issue as it's not actually related to the docs, just a questionable practice within Orchard itself.
I would suggest opening a thread on the Orchard Discussion Forums on codeplex, StackOverflow, Orchard Pros, or the Gitter chat room to try and get more info.
Here I see code like this:
Url.Content("~/modules/orchard.themes/Content/orchard.ico")
.Why would one ever have absolute paths in theme templates? Isn't the view engine supposed to resolve such paths to the current theme or root application?
I asked this in a StackOverflow comment too.