CMS 10.0–10.5 Rendering In-Context Editing (ICE) Content


Content contributors can enter content directly in CMS 10.0–10.5 In-Context Editing (ICE) mode and see the results of their work immediately. In order for content contributors to use ICE, developers must wrap ICE helpers around the fields that will be accessible within ICE.

To include the RenderICEAttribute() helper in an ASP.Net view for CMS 10.0–10.5:
  1. Create a custom view template to work with the list element in ICE.

    Assuming you use Visual Studio as your IDE, see Adding Views in VS Project.

  2. For each value where content contributors can edit in ICE, wrap the code that generates the values within a tag containing the call to the ICE helper method. To accomplish this, integrate the ICE helper method (i.e., RenderICEAttribute()) into the cut-up HTML.
    Note
    The code sample below includes ICE helper methods. For example, in the highlighted area, an <h1> tag contains the RenderICEAttribute method that wraps the Title content.

    If you need to customize the ICE method, you can find RenderICEAttribute() in [Drive]:\[path-to-dss-install]\[site-name]\App_Code\_Helpers.cshtml.

    CMS 10.0–10.5 ICE Code Sample in View

  3. Save your work after wrapping the appropriate values within the custom view.
  4. Open the associated page in Ingeniux CMS to test the inclusion of the ICE helpers.
    Note
    Keep the following in mind.
    • Your view should render the appropriate ICE fields within Site > Edit > In-Context Edit View mode.
    • In this case, after checking out the page, the Title text element value renders as an editable field.

    CMS 10.0–10.5 ICE Field Rendered in Page