Click or drag to resize

PresentationsAdminServicesSaveContentUnitView Method


Saves the built-in view code of a content unit

Namespace:  IngeniuxCMService
Assembly:  IngeniuxCMService (in IngeniuxCMService.dll) Version: 10.5.94
Syntax
public XHRServiceResponseGeneric<ContentUnitPreviewData> SaveContentUnitView(
	ContentUnitPreviewData data
)

Parameters

data
Type: ContentUnitPreviewData

Built-in asset view source code and content unit id

Examples

Sample JSON Input

JavaScript
{
    "ID": "ComponentContentUnits/1",
    "AssetViewId": "",
    "AssetViewCode": "@model Ingeniux.Runtime.ICMSElement\n@using Ingeniux.Runtime\n@if (Model != null)\n{\n\t<div  @_Helpers.RenderICEAttribute(Model)>@Model.Value</div>\n}"
}

Return Value

Type: XHRServiceResponseGenericContentUnitPreviewData

Updated content unit built-in view data

Examples

Sample JSON return

JavaScript
{
    "ContentFreezeEndTime": "",
    "ContentFreezeStartTime": "",
    "code": 0,
    "error": null,
    "message": {
        "ID": "ComponentContentUnits\/1",
        "Name": "Right Copy",
        "AssetViewCode": "@model Ingeniux.Runtime.ICMSElement\u000d\u000a@using Ingeniux.Runtime\u000d\u000a@if (Model != null)\u000d\u000a{\u000d\u000a\u0009<div @_Helpers.RenderICEAttribute(Model)>@Model.Value<\/div>\u000d\u000a}",
        "AssetViewCodeEsc": "@model Ingeniux.Runtime.ICMSElement\u000d\u000a@using Ingeniux.Runtime\u000d\u000a@if (Model != null)\u000d\u000a{\u000d\u000a\u0009&lt;div @_Helpers.RenderICEAttribute(Model)&gt;@Model.Value&lt;\/div&gt;\u000d\u000a}",
        "AssetViewId": "",
        "CanEditView": true,
        "Finalized": false,
        "UseExistingView": false
    }
}
See Also