Theme Customization and Image File Placement

Topics: Writing themes
May 24, 2011 at 11:44 PM
Edited May 24, 2011 at 11:48 PM

My theme is based off a copied ThemeMachine folder structure (copy paste)

 

I put images that my css relies on in Themes/MyTheme/Styles/Images folder which works when referencing in my css.  I then altered the Branding.cshtml by adding an img tag that references an image in my Themes/MyTheme/Styles/Images folder.   When Logging into Orchard the images are broken here are the URL's it is trying to use.

 

Works:
http://localhost:30320/OrchardLocal/Themes/MyTheme/Styles/Images/LogoWebHeader.png

Broken:
http://localhost:30320/OrchardLocal/Users/Account/Themes/MyTheme/Styles/Images/LogoWebHeader.png

 

Is this a bug or where should I place my images so they work throughout the application?

Coordinator
May 24, 2011 at 11:56 PM

You should not specify any "/whatever" pathes. Instead, use @Url.Content("~/whatever").

May 25, 2011 at 12:45 AM

Lovely!