add script injection to the config to import custom webfront scripts (ie google tracking)
This commit is contained in:
parent
a2c7d92162
commit
1317102d00
@ -145,6 +145,7 @@ namespace SharedLibraryCore
|
|||||||
ViewBag.EnableColorCodes = AppConfig.EnableColorCodes;
|
ViewBag.EnableColorCodes = AppConfig.EnableColorCodes;
|
||||||
ViewBag.EnablePrivilegedUserPrivacy = AppConfig.EnablePrivilegedUserPrivacy;
|
ViewBag.EnablePrivilegedUserPrivacy = AppConfig.EnablePrivilegedUserPrivacy;
|
||||||
ViewBag.Configuration = AppConfig;
|
ViewBag.Configuration = AppConfig;
|
||||||
|
ViewBag.ScriptInjection = AppConfig.Webfront?.ScriptInjection;
|
||||||
|
|
||||||
base.OnActionExecuting(context);
|
base.OnActionExecuting(context);
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,9 @@ namespace SharedLibraryCore.Configuration
|
|||||||
[LocalizedDisplayName("WEBFRONT_CONFIGURATION_CUSTOM_BRANDING")]
|
[LocalizedDisplayName("WEBFRONT_CONFIGURATION_CUSTOM_BRANDING")]
|
||||||
public string WebfrontCustomBranding { get; set; }
|
public string WebfrontCustomBranding { get; set; }
|
||||||
|
|
||||||
|
[ConfigurationIgnore]
|
||||||
|
public WebfrontConfiguration Webfront { get; set; } = new WebfrontConfiguration();
|
||||||
|
|
||||||
[LocalizedDisplayName("SETUP_ENABLE_MULTIOWN")]
|
[LocalizedDisplayName("SETUP_ENABLE_MULTIOWN")]
|
||||||
public bool EnableMultipleOwners { get; set; }
|
public bool EnableMultipleOwners { get; set; }
|
||||||
|
|
||||||
|
7
SharedLibraryCore/Configuration/WebfrontConfiguration.cs
Normal file
7
SharedLibraryCore/Configuration/WebfrontConfiguration.cs
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
namespace SharedLibraryCore.Configuration
|
||||||
|
{
|
||||||
|
public class WebfrontConfiguration
|
||||||
|
{
|
||||||
|
public string ScriptInjection { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -202,5 +202,6 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@await RenderSectionAsync("scripts", required: false)
|
@await RenderSectionAsync("scripts", required: false)
|
||||||
|
@Html.Raw(ViewBag.ScriptInjection);
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Loading…
Reference in New Issue
Block a user