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

  1. Install the Contribution.CompositeC1Contrib.RazorFunctions package (System | Packages | Available Packages).
  2. In the code editor of your choice (for example, Visual Studio), create a .cshtml file under ~/App_Data/Razor following the guide on Razor Functions.
  3. Insert the Razor function as you insert regular C1 functions (in Visual or Source Editor)

Requirements

Composite C1 version 2.0 SP1 or later

SHARE