Skip to content

Module for Orchard Core for adding JavaScript to <head> or bottom of page.

License

Notifications You must be signed in to change notification settings

EtchUK/Etch.OrchardCore.InjectScripts

Repository files navigation

Etch.OrchardCore.InjectScripts

Module for Orchard Core that allows you to specify custom script blocks for the <head> or at the bottom of the page. Useful for adding third party integrations (e.g. Google Analytics).

Build Status

NuGet

Orchard Core Reference

This module is referencing a stable build of Orchard Core (1.8.3).

Installing

This module is available on NuGet. Add a reference to your Orchard Core web project via the NuGet package manager. Search for "Etch.OrchardCore.InjectScripts", ensuring include prereleases is checked.

Alternatively you can download the source or clone the repository to your local machine. Add the project to your solution that contains an Orchard Core project and add a reference to Etch.OrchardCore.InjectScripts.

Usage

Enable the "Inject Scripts" feature, which will make a new "Scripts" option available under the "Configuration" option in the admin dashboard menu. Within the "Scripts" section, authorised content editors can define JavaScript that will be rendered either in the <head> section or at the foot of the page. If the JavaScript is not rendered on the page, ensure the following snippets are in the layout.liquid template for your theme.

{% resources type: "HeadScript" %}
{% resources type: "FootScript" %}

About

Module for Orchard Core for adding JavaScript to <head> or bottom of page.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages