Theme images not found

Topics: Writing themes
Aug 12, 2012 at 8:25 PM

Hi everyone.

I'm really puzzled. I'm creating a custom theme and wanted to add a logo to the theme. I've added an image to my theme folder and I'm trying to add it to layout.cshtml using this

<img src="@Url.Content(Html.ThemePath(WorkContext.CurrentTheme, "/img/logo.png"))" alt="@WorkContext.CurrentSite.SiteName" />

however I'm getting a 404 resource not found.

Any ideas ?



Aug 13, 2012 at 12:16 AM

Make sure the folder that the image is in has the Web.config settings necessary to serve static files.  Check the Content and Scripts folder of TheThemeMachine for an example.

Aug 22, 2012 at 7:17 PM

Thanks that solved the issue. I moved my logo into one of the folder with the web.config and it worked.