Try our conversational search powered by Generative AI!

Loading custom remote JavaScript and CSS resources

Vote:
 

Hello,

I need to load custom built JavaScript and CSS resources into EPiServer's edit mode. I've figured out how to do this in EPiServer 9, but so far my research has only lead me to understand that I cannot apply the same solution to EPiServer 6, and I've yet to come up with anything substantial as to how to do it, which is why I'm here asking for your help.

So what I need to be able to do is to load a piece of JavaScript and CSS from a remote host into primarily the edit mode of EPiServer 6. Is it possible to do this in a way that's similar to modifying the module.config in EPiServer 9?

With kind regards,

Jonathan

#173239
Dec 16, 2016 11:53
Vote:
 

Where do you need it? One way can be by adding a Custom Property to the project. From there you can reach the control tree and add a HTML control for the LINK and SCRIPT elements you need. It will only work inside the Edit form and you won't reach the page tree for example.

Another approach is to hack the Masterpage below Program Files or if you copy that whole chunk into your repo. If you're running 6 now it's probably gonna stay on the same 6 version so you're not likely to do much extra work keeping your hack in place.

#173260
Dec 18, 2016 23:41
Vote:
 

I need it to load into the client's browser when requesting a page. Hopefully we can load it only for users who are actively in the Edit mode, since that is my primary focus. Otherwise I will build my own solution for limiting the script to Edit mode.

I will not have simple access to the project's code, and therefore hope there's either some kind of master template that can be modified, or like in the case of EPi9 there is a config file that I can modify to load the resources.

#173308
Dec 20, 2016 14:02
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.