Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Inject JS/CSS into CMS Edit View


Hi, I need to add a litle custom CSS into the edit view to hide the nav/toolbar panes when I have a certain querysting parameter. Ideally I would do this with JS, but I can't find a way to inject a custom JS script into the main CMS page (Cms#context=epi.cms.contentdata:///..).

Does anyone know if this is possible?



May 11, 2015 13:32

Add the following in your module.config in the root of the project (create it if it doesn't exist):

<?xml version="1.0" encoding="utf-8"?>
        <add name="epi-cms.widgets.base" path="~/Path/To/Script.js" resourceType="Script" />
May 12, 2015 12:01

Btw, if you need to inject CSS you can add another clientResource-element and set resourceType="Style".

May 12, 2015 15:18

I found out that we can use navigation instead epi-cms.widgets.base, that will add the script to both Edit mode and Admin mode

<add name="navigation" path="~/ClientResources/Scripts/xyz.js" resourceType="Script"/>
Jun 01, 2017 5:36
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.