I am using Orchard MVC to one of my project. I was trying to create custom module. I don't find any problem in that. But when I tried to put image in view page, I am facing problem. I don't know if problem is of Routing or Orchard it self.
First thing module has "dot" in its name like Orchard. so, if I am trying to giving path from Modules/Orchard.Name/Style/Images/1.jpg it has . in between which I guess not true. And if I trying to access like this ../../../Style/Images/1.jpg in final url it has http://localhost/style/Images/1.jpg which is not the path of Image.
How to access url of image. Do I have to define custom routes to access? Or is there any other workaround?
All you have to do is look at one of a bazillion examples in the code ;) Such as this:
<img class="icon" src="@Href("~/Modules/Orchard.Users/Content/Admin/images/online.gif") " alt="@T("Approved") " title="@T("User is approved") " />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With