Extensibility#
Addins#
Colectica Portal addins are .NET assemblies that extend the portal.
Addins are discovered using the Managed Extensibility Framework (MEF), so classes must be
marked with the [Export] attribute for the interface they implement.
The following extension points are available.
IItemListReportCreates a custom report for the items in a basket. The report appears in the Basket Downloads area of the basket page.
IVersionableWebViewReplaces the built-in display template for an item type with a template supplied by the addin.
IItemIndexerIndexes additional fields for items when the Elasticsearch index is built, and declares the search facets that the portal shows for those fields. Fields can be shown as text boxes, lists of values, or date ranges on the search page. The values for a list are read from a file named
elastic_fieldName_options.jsonin the addins directory.ITextRendererCustomizes how metadata text is rendered.
Note
Custom item reports, previously created with the IReportBuilder interface, are not
available in this release. The PDF generation pipeline was replaced by Typst, and
the addin interface for custom documents will be recreated on the new pipeline.
See also
For a sample addin project, see Colectica/ColecticaSampleAddins
For addins that require access to the Colectica object model, see Colectica SDK.
Deploying Addins#
An addin is a .NET assembly targeting the same .NET version as Colectica Repository.
To deploy a Colectica Portal addin, copy the addin assembly (*.dll) to
RepositoryDir/Addins and restart the application.
Parts#
Parts are assemblies that add whole features to the portal: controllers, Razor views, and static files.
A part is registered as an ASP.NET Core application part, and any wwwroot content embedded in the assembly
is served by the portal.
To deploy a part, copy its assembly to RepositoryDir/parts and restart the application.
The addins and parts that are loaded are listed on the System Status page.