Nucleus .Net Core CMS

HtmlHelpers.AddStyleHtmlHelper Class

Namespace: Nucleus.ViewFeatures.HtmlHelpers
Assembly: Nucleus.ViewFeatures.dll
Html helper used to add styles.

Methods

AddStyle (IHtmlHelper,WellKnownScripts) Method

AddStyle (IHtmlHelper htmlHelper, WellKnownScripts script)
Add a well-known script.

AddStyle (IHtmlHelper,String) Method

AddStyle (IHtmlHelper htmlHelper, String stylesheetPath)
Register the specified style to be added to the Layout or module's CSS styles.
Parameters
Name Type
htmlHelper Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper
stylesheetPath String
Examples
@Html.AddScript("~/Extensions/MyModule/MyModule.css")
Remarks
Extensions (modules) can use this Html Helper to add CSS stylesheets to the HEAD block. The scriptPath can contain the ~! for the currently executing view path, or ~# for the currently executing extension.

AddStyle (IHtmlHelper,String,Boolean) Method

AddStyle (IHtmlHelper htmlHelper, String stylesheetPath, Boolean defer)
Register the specified style to be added to the Layout or module's CSS styles.
Parameters
Name Type
htmlHelper Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper
stylesheetPath String
defer Boolean
Examples
@Html.AddScript("~/Extensions/MyModule/MyModule.css")
Remarks
Extensions (modules) can use this Html Helper to add CSS stylesheets to the HEAD block. The scriptPath can contain the ~! for the currently executing view path, or ~# for the currently executing extension.

AddStyle (IHtmlHelper,String,Boolean,Boolean) Method

AddStyle (IHtmlHelper htmlHelper, String stylesheetPath, Boolean defer, Boolean isDynamic)
Register the specified style to be added to the Layout or module's CSS styles.
Parameters
Name Type
htmlHelper Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper
stylesheetPath String
defer Boolean
isDynamic Boolean
Examples
@Html.AddScript("~/Extensions/MyModule/MyModule.css")
Remarks
Extensions (modules) can use this Html Helper to add CSS stylesheets to the HEAD block. The scriptPath can contain the ~! for the currently executing view path, or ~# for the currently executing extension.

AddStyle (IHtmlHelper,String,Boolean,Boolean,String) Method

AddStyle (IHtmlHelper htmlHelper, String stylesheetPath, Boolean defer, Boolean isDynamic, String version)
Register the specified style to be added to the Layout or module's CSS styles.
Parameters
Name Type
htmlHelper Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper
stylesheetPath String
defer Boolean
isDynamic Boolean
version String
Examples
@Html.AddScript("~/Extensions/MyModule/MyModule.css")
Remarks
Extensions (modules) can use this Html Helper to add CSS stylesheets to the HEAD block. The scriptPath can contain the ~! for the currently executing view path, or ~# for the currently executing extension.

RenderStyles (IHtmlHelper) Method

RenderStyles (IHtmlHelper htmlHelper)
Adds the scripts submitted by AddStyle to the layout. This method is intended for use by the Nucleus Core layout.
Parameters
Name Type
htmlHelper Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper