Use Razor to create C1 functions
The Contribution.CompositeC1Contrib.RazorFunctions package enables Razor functions on your website based on the community-contributed functionality.
After installing the package, you can create C1 functions using the Razor syntax and use them as native C1 functions throughout the system.
Read more on creating and using Razor Functions in Composite C1.
How to implement
- Install the Contribution.CompositeC1Contrib.RazorFunctions package (System | Packages | Available Packages).
- In the code editor of your choice (for example, Visual Studio), create a
.cshtmlfile under~/App_Data/Razorfollowing the guide on Razor Functions. - Insert the Razor function as you insert regular C1 functions (in Visual or Source Editor)
Requirements
Composite C1 version 2.0 SP1 or later