CMS Reference
cms.xml
1
<?xml version="1.0" encoding="utf-8" ?>
2
<cms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/shopware/platform/trunk/src/Core/Framework/App/Cms/Schema/cms-1.0.xsd">
3
<blocks>
4
<block>
5
<!-- A unique technical name for your block. We recommend to use a shorthand prefix for your company, e.g. "Swag" for shopware AG. -->
6
<name>my-first-block</name>
7
<!-- The category your block is associated with. See the XSD for available categories. -->
8
<category>text-image</category>
9
​
10
<!-- Your block's label which will be shown in the CMS module in the Administration. -->
11
<label>First block from app</label>
12
<!-- The label is translatable by providing ISO codes. -->
13
<label lang="de-DE">Erster Block einer App</label>
14
​
15
<!-- The slots that your block holds which again hold CMS elements. -->
16
<slots>
17
<!-- A slot requires a unique name and a type which refers to the CMS element it shows. Right now you can only use the CMS elements provided by Shopware but at a later point you will be able to add custom elements too. -->
18
<slot name="left" type="manufacturer-logo">
19
<!-- The slot requires some basic configuration. The following config-value elements highly depend on which element the slot holds. -->
20
<config>
21
<!-- The following config-value will be interpreted as "displayMode: { source: "static", value: "cover"}" in the JavaScript. -->
22
<config-value name="display-mode" source="static" value="cover"/>
23
</config>
24
</slot>
25
<slot name="middle" type="image-gallery">
26
<config>
27
<config-value name="display-mode" source="static" value="auto"/>
28
<config-value name="min-height" source="static" value="300px"/>
29
</config>
30
</slot>
31
<slot name="right" type="buy-box">
32
<config>
33
<config-value name="display-mode" source="static" value="contain"/>
34
</config>
35
</slot>
36
</slots>
37
​
38
<!-- Each block comes with a default configuration which is pre-filled and customizable when adding a block to a section in the CMS module in the Administration. -->
39
<default-config>
40
<margin-bottom>20px</margin-bottom>
41
<margin-top>20px</margin-top>
42
<margin-left>20px</margin-left>
43
<margin-right>20px</margin-right>
44
<!-- The sizing mode of your block. Allowed values are "boxed" or "full_width". -->
45
<sizing-mode>boxed</sizing-mode>
46
<background-color>#000</background-color>
47
</default-config>
48
</block>
49
​
50
<block>
51
<name>my-second-block</name>
52
<category>text-image</category>
53
​
54
<label>Second block from app</label>
55
<label lang="de-DE">Zweiter Block einer App</label>
56
​
57
<slots>
58
<slot name="left" type="form">
59
<config>
60
<config-value name="display-mode" source="static" value="cover"/>
61
</config>
62
</slot>
63
<slot name="middle" type="image">
64
<config>
65
<config-value name="display-mode" source="static" value="auto"/>
66
<config-value name="background-color" source="static" value="red"/>
67
</config>
68
</slot>
69
<slot name="right" type="youtube-video">
70
<config>
71
<config-value name="display-mode" source="static" value="contain"/>
72
</config>
73
</slot>
74
</slots>
75
​
76
<default-config>
77
<margin-bottom>20px</margin-bottom>
78
<margin-top>20px</margin-top>
79
<margin-left>20px</margin-left>
80
<margin-right>20px</margin-right>
81
<sizing-mode>boxed</sizing-mode>
82
<background-color>#000</background-color>
83
</default-config>
84
</block>
85
</blocks>
86
</cms>
Copied!
Last modified 4mo ago
Copy link