Nucleus .Net Core CMS

TagHelpers.MergeStylesheetsTagHelper Class

Namespace: Nucleus.ViewFeatures.TagHelpers
Assembly: Nucleus.ViewFeatures.dll
Tag Helper used to merge multiple CSS stylesheet <link> tags into a single "merged" tag, which is handled by the MergedFileProvider. A single <MergeLinks> can wrap all of your link elements. The MergeLinksTagHelper will merge <link> tags with the same path - it will generate separate <link> tags for each path in order to preserve relative paths within your CSS files.


The MergeScriptsTagHelper is implemented within the Nucleus shared _Layout Razor layout and wraps all scripts, including any scripts that you add with AddStyle. Under normal circumstances, you should not need to use the MergeStylesheetsTagHelper in your code. There is no HtmlHelper equivalent for the MergeStylesheetsTagHelper.


Nucleus.ViewFeatures.TagHelpers.MergeStylesheetsTagHelper Constructor

Nucleus.ViewFeatures.TagHelpers.MergeStylesheetsTagHelper (IOptions<ResourceFileOptions> options, ILogger<MergeStylesheetsTagHelper> Logger)
Name Type
options Microsoft.Extensions.Options.IOptions<Nucleus.Abstractions.Models.Configuration.ResourceFileOptions>
Logger Microsoft.Extensions.Logging.ILogger<Nucleus.ViewFeatures.TagHelpers.MergeStylesheetsTagHelper>


ViewContext Property

Provides access to view context.


ProcessAsync (TagHelperContext,TagHelperOutput) Method

ProcessAsync (TagHelperContext context, TagHelperOutput output)
Merge style sheets.