Plugins Development
Externable allows you to easily customize the Content (and intergrate it with Dynamics!), Media, CSS, JavaScript libraries and MVC C# Razor views - all of that enables you to build almost any website layout you can imagine, streight in the backoffice panel. However, sometimes you need custom C# plugins, because Razor views are not enough. Good example is adding custom REST API endpoints, when you want the website to support integration with 3rd party software.
Custom plugins are not available in all plans, so if you don't know if your subscription plan supports them, please check the Pricing page or contact our support.
How it works
Custom plugin is a C# code, which you can create locally in your Visual Studio. You need to follow same patterns as when building ASP.NET MVC application. You can structure your code in multiple classes and files like you normally do.
Start with getting dedicated Git repo
You will need to request dedicated Git repo though our support, which will be connected to our CD/CI tool and will append your custom code to your portal instance whenever you commit a new change.
We do offer additional services to support our customers in Externable custom coding. Contacts us for more details.
Creating basic plugin
To create a basic plugin we recommend using a template which you will get commited to your dedicated Git repo.
It is worth building your plugin in VS before you commit it, so as to ensure no obvious issues are in the code.
Your plugin name must be unique so that you don't face errors due to conflict with other plugins
Structure of sample plugin:
How to use the plugin
When you commit your code, our CD/CI tool will merge it with Externable instance. You can start using your custom classes in Razor views or by querying REST API Controllers. For example, if your custom code queries and parses some complex dataset, you can create a function, which will handle the logic and only refer to it in the Razor View (see Partial View) rather than write the whole logic in the Razor view itself.
If your solution relies on DLLs which are not a part of the default Plugin template, we can extend your instance with those DLLs. That however can't be done automatically through repo commit and it requires contacting our support.
Go next to find out how to create controllers which allow you to expose custom REST API endpoints!