How do I replace the site name with an image?

Topics: General
Oct 4, 2015 at 9:59 PM
In the header of the default layer the Site title is set to the site name. I would like to replace this with a logo that is saved as an image file. Is this possible?
Oct 12, 2015 at 8:57 AM
You can do this by overriding the Branding.cshtml view in your theme. The view in TheThemeMachine looks like this:
<h1 id="branding"><a href="@Href("~/")">@WorkContext.CurrentSite.SiteName</a></h1>
In there you can include an image instead of the site name.
Oct 12, 2015 at 10:33 PM
Thanks. I have tried several versions of that previously to no avail. I am not great at html. Can you give me an example?
Thanks again.
Oct 13, 2015 at 9:10 AM
Edited Oct 13, 2015 at 9:11 AM
You can do something like this:
<a href="@Href("~/")><img src="@Href("~/Themes/MyTheme/Content/Images/logo.png")" alt="Our Logo" /></a>
This assumes you have a 'logo.png' in MyTheme/Content/Images/logo.png.
Oct 13, 2015 at 11:02 PM
Thanks again for your help. The final solution is to remove the leading ~ (tilde) in the src= statement.