private static MvcHtmlString RegisterAsset(this HtmlHelper htmlHelper, ContentType assetType, string fileName, AssetRendering renderWhen, int order)
        {
            if (!htmlHelper.ViewContext.HttpContext.Kentico().Preview().Enabled&& renderWhen == AssetRendering.AdminOnly ||
                htmlHelper.ViewContext.HttpContext.Kentico().Preview().Enabled&& renderWhen == AssetRendering.FrontendOnly)
            {
                return(MvcHtmlString.Empty);
            }

            return(MvcHtmlString.Create(RegisterComponent(assetType, fileName, order)));
        }
 public static MvcHtmlString RegisterSvg(this HtmlHelper htmlHelper, string fileName,
                                         AssetRendering renderWhen = AssetRendering.FrontendOnly, int order = 100) =>
 RegisterAsset(htmlHelper, ContentType.Svg, fileName, renderWhen, order);