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!

Creating a custom protected module


I would like to create a module for EPiServer and don't know where to begin. I've read some articles here and there, but some seem a little outdated.

What I'm looking to do, is to make a module that i stored in ~/modules/_protected/ - in a zip-file and its assembly is referenced in my project(s), so I can access the code from there.

Think of it as my own little re-usable code. But also as a way to standardize extensions to the CMS UI.

How do I begin?


Jun 14, 2016 15:24

What kind of extensions are you talking about? If it's only code extensions then standard nuget package is more suitable than a protected addon. 

Addons should not have references from your code. They should be stand alone. Use standard nuget package instead if you need that part.

Jun 14, 2016 16:34

By extensions I mean for example an admin part to manage some settings, or a UI panel in edit mode to, or a gadget.

But from what I can hear, I should separate the projects: a NuGet package for the code I want to access, and a zip-file / module to enrich Episerver.

Speaking of the latter; module. How do "they" make them? From what I can see it's just a zip-file with at least a module.config file, and then it's referenced (somehow?) in the web.config:

<publicModules rootPath="~/modules/" autoDiscovery="Modules" />
<protectedModules rootPath="~/EPiServer/">
  <add name="Shell" />
  <add name="CMS" />
  <add name="EPiServer.Packaging.UI" />

So that's what I want to know more about.


Jun 15, 2016 8:35

I did a few of those. It takes a little while to get the first up and running but it's not really hard. You can start by reading the documentation about addons here

The important parts is for protected addons in your case. Hope that helps to get you started. An addon is a nuget package that is easy to install/delete more or less with a few bells and whistles to solve some routing of resources (images/css/js) and similar. 

Edited, Jun 15, 2016 9:03
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.