Module: ui/cms
Functions
registerCmsElement
▸ registerCmsElement(messageOptions
): Promise
<void
>
Parameters
Name | Type |
---|---|
messageOptions | MessageDataType <"cmsRegisterElement" > |
Returns
Promise
<void
>
Defined in
packages/admin-sdk/src/channel.ts:446
registerCmsBlock
▸ registerCmsBlock(messageOptions
): Promise
<void
>
Parameters
Name | Type |
---|---|
messageOptions | MessageDataType <"cmsRegisterBlock" > |
Returns
Promise
<void
>
Defined in
packages/admin-sdk/src/channel.ts:446
Type Aliases
cmsRegisterElement
Ƭ cmsRegisterElement: Object
Type declaration
Name | Type | Description |
---|---|---|
responseType | void | - |
name | string | The unique name of the cms element, which will also be used to generate locationIds - Should have vendor prefix Example ts 'company-my-image-slider' will result in the location ids: - 'company-my-image-slider-element' for the element in the cms itself - 'company-my-image-slider-preview' for the preview in the cms element selection - 'company-my-image-slider-config' for the configuration modal of a placed element |
label | string | The label, which is visible when selecting the cms element - Use snippet keys here! |
defaultConfig | { [key: string] : unknown ; } | Object containing the defaultConfig; same like in plugin development. Url https://developer.shopware.com/docs/guides/plugins/plugins/content/cms/add-cms-element |
Defined in
packages/admin-sdk/src/ui/cms/index.ts:6
cmsRegisterBlock
Ƭ cmsRegisterBlock: Object
Type declaration
Name | Type | Description |
---|---|---|
responseType | void | - |
name | string | A unique technical name for your block. We recommend to use a shorthand prefix for your company, e.g. "Swag" for shopware AG. |
category? | "commerce" | "form" | "image" | "sidebar" | "text-image" | "text" | "video" | string & Record <never , never > | The category your block is associated with, e.g. "commerce", "form", "image", "sidebar", "text-image", "text", "video", etc. New custom categories will get the following snippet key: "apps.sw-cms.detail.label.blockCategory.{categoryName}" |
label | string | Your block's label which will be shown in the CMS module in the Administration. |
slots | { element : string }[] | Define the slots of the block. Each slot is a single div. The element property is the name of the element that can be placed in the slot. |
slotLayout? | { grid? : string } | Define the layout of the block. The grid property is a shorthand for the CSS grid property. The grid property is optional. |
slotLayout.grid? | string | The grid layout for the block. Each slot is a single div. Can be defined with the CSS shorthand property "grid": https://developer.mozilla.org/en-US/docs/Web/CSS/grid Examples: 1 column layout example: "auto / auto" 2 column layout example: "auto / auto auto" 2 row layout example: "auto auto / auto-flow auto" |
previewImage? | string | - |
Defined in
packages/admin-sdk/src/ui/cms/index.ts:33