Skip to main content
The R83 documentation is unmaintained. There is a newer version of Contensis. Click to find out more and download the latest version.

Inline Razor control

When you need to insert small snippets of razor, it’s often frustrating to have to create a razor view, submit and approve it before inserting it into a template or page. In Contensis 8.3, it’s now possible to write inline razor with the help of an inline razor control.

  • Right click within the editor where you want the control to be placed.
  • Select Insert Web Control from the context menu.
  • Navigate to Standard.
  • Select Inline Razor for the fly out menu – a dialog window will open.
  • Select the language that you writing your Razor in (we recommend c# - that’s the default).
  • Type the Razor you want to appear on the page.

Using Razor via WebDAV

If you work locally using WebDAV, you can take advantage of the new inline razor control as well as referencing Razor files by using the following syntax:

Inline Razor View Web Control Syntax

Inline Razor View File Syntax