I am trying to customize all the page header on Orchard v1.6.1 by replacing the text (of the store name) with a clickable image link. However, the image does not show up.
var homeUrl = Href("~/");
<h1 id="branding"><a href="@homeUrl">
<img src="@Url.Content(Html.ThemePath(WorkContext.CurrentTheme, "/Images/Logo.gif"))" height="65" width="550" alt="@WorkContext.CurrentSite.SiteName" />
When i load the page, the logo image does not display, so I figured I had the path wrong.
Debugging further, I found the path to be 100% correct, yet the image does not display and I get a 404 error.
Server Error in '/OrchardLocal' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /OrchardLocal/Themes/TheThemeMachineResponsive/Images/Logo.png
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18045
I browsed to the folder
http://localhost:30320/OrchardLocal/Themes/TheThemeMachineResponsive/Images/ and I got a directory listing
showing the Logo.png
I checked security for the file and made sure it was set to allow 'everyone' permissions.
To eliminate the browser (Firefox), I opened the image fine on the harddrive and it displayed in the browser.
The only thing I can think of is that there is a routing problem somewhere.