Umbraco Inline Razor to refer to Stylesheets within a Template
Umbraco Inline Razor to refer to a Stylesheet Example:
<umbraco:Macro runat="server" language="cshtml">
@{var myStyleSheet = "~/css/styles.css";}
<link rel="stylesheet" href="@Href(myStyleSheet)" type="text/css" media="screen" />
@{var IEStyleSheet = "~/css/stylesIE.css";}
<!--[if lte IE 8]>
<link rel="stylesheet" href="@Href(myStyleSheet)" type="text/css" media="screen" />
<![endif]-->
</umbraco:Macro>
Umbraco Inline Razor to refer to lots of Stylesheets, using the folder as the reference Example
<umbraco:Macro runat="server" language="cshtml">
@{var myStyleSheetFolder = "~/css/";}
<link href="@Href(myStyleSheetFolder)bootstrap.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="@Href(myStyleSheetFolder)theme.css">
<link rel="stylesheet" href="@Href(myStyleSheetFolder)index.css" type="text/css" media="screen" />
</umbraco:Macro>
Comments
Post a Comment