This function creates a new CSS Resource in Miva's CSS Resource Management.
Description#
This function creates a new CSS Resource in Miva’s CSS Resource Management.
Request Body Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
CSSResource_Code |
String | Yes | Required. Code of the new CSS resource. Must be unique. |
CSSResource_Type |
String | Yes | Required. Resource type: C (combined), I (inline), L (local file), E (external file), M (module) or Y (module inline). |
CSSResource_Global |
Boolean | No | Whether the resource is global (output on all pages). Default is false. |
CSSResource_Active |
Boolean | No | Whether the resource is active. Default is false. |
CSSResource_File_Path |
String | No | File path or URL of the resource (max 254 characters). Required when CSSResource_Type is L or E. |
CSSResource_Module_Code |
String | Yes | Required when CSSResource_Type is M or Y. Code of an active module that implements the cssresource feature. |
CSSResource_Module_Data |
String | Yes | Required when CSSResource_Type is M or Y. Module data passed to the module (max 100 characters). |
CSSResource_Attributes |
Array | Array of attribute objects, each with a required name and an optional value. |
Example Request#
{
"Store_Code": "{{Store_Code}}",
"Miva_Request_Timestamp": "{{$timestamp}}",
"Function": "CSSResource_Insert",
"CSSResource_Code": "test",
"CSSResource_Type": "l",
"CSSResource_File_Path": "themes/00000001/shadows/custom.css",
"CSSResource_Global": true,
"CSSResource_Active": true
}
Example Response#
{
"success": 1
}