forked from BitBagCommerce/SyliusCmsPlugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bitbag_sylius_cms_plugin.yml
281 lines (272 loc) · 20.8 KB
/
bitbag_sylius_cms_plugin.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
imports:
- { resource: "@BitBagSyliusCmsPlugin/Resources/config/config.yml" }
parameters:
fixtures_dir: "%kernel.project_dir%/Resources/fixtures"
sylius_fixtures:
suites:
default:
listeners:
orm_purger: ~
logger: ~
fixtures:
section:
options:
custom:
blog:
translations:
en_US:
name: "Blog"
general:
translations:
en_US:
name: "General"
store:
translations:
en_US:
name: "Store"
homepage:
translations:
en_US:
name: "Homepage"
products:
translations:
en_US:
name: "Products"
block:
options:
custom:
homepage_products_info:
channels:
- "FASHION_WEB"
translations:
en_US:
content: |
<div class="ui info message">
<i class="em em-arrow_down"></i> Click one of the below products to see what you can do with the blocks in your product view! <i class="em em-arrow_down"></i>
</div>
section_info_block:
channels:
- "FASHION_WEB"
sections:
- "products"
translations:
en_US:
content: |
<div class="ignored info ui message">
The block you can see on the left is just a block associated with a section named <code>Products</code>
</div>
<p>With this feature, you can render any block you want on the product page, like size table, delivery information, or even promotion banner.</p>
<p>It's done with a simple controller render:</p>
<pre>{{ render(path('bitbag_sylius_cms_plugin_shop_block_index_by_section_code', {'sectionCode' : 'products', 'template' : '@BitBagSyliusCmsPlugin/Shop/Block/index.html.twig'})) }}</pre>
product_info_block:
channels:
- "FASHION_WEB"
products: 5
translations:
en_US:
content: |
<div class="ignored info ui message">On the other hand, the block on the right is a block associated with specific products.</div>
<p>This approach can be helpful with displaying some content dedicated to specific products, like size table or product story</p>
<p>The way you render it is similar to the one from above example:</p>
<pre>{{ render(path('bitbag_sylius_cms_plugin_shop_block_index_by_product_code', {'productCode' : product.code, 'template' : '@BitBagSyliusCmsPlugin/Shop/Block/index.html.twig'})) }}</pre>
homepage_intro:
channels:
- "FASHION_WEB"
translations:
en_US:
content: |
<h3>Blocks</h3>
<p>
The left block is rendered with the usage of the particular controller like this:
</p>
<pre>
render(path('bitbag_sylius_cms_plugin_shop_block_render', {'code' : 'homepage_header_image'}))
</pre>
<p>
It also can take template as a parameter, but it's optional. In this case, it works the same as below Twig functions. Sometimes you might want the block to render in a different template, that's where the controller is useful.
</p>
<p>
The other three blocks, including this one you are reading right now, are using Twig helper method.
</p>
<pre>
bitbag_cms_render_block('homepage_intro')
bitbag_cms_render_block('homepage_banner_image_1')
bitbag_cms_render_block('homepage_banner_image_2')
</pre>
lorem_ipsum:
channels:
- "FASHION_WEB"
sections:
- "homepage"
translations:
en_US:
content: |
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>
<ul>
<li>Morbi in sem quis dui placerat ornare. Pellentesque odio nisi, euismod in, pharetra a, ultricies in, diam. Sed arcu. Cras consequat.</li>
<li>Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus.</li>
<li>Phasellus ultrices nulla quis nibh. Quisque a lectus. Donec consectetuer ligula vulputate sem tristique cursus. Nam nulla quam, gravida non, commodo a, sodales sit amet, nisi.</li>
<li>Pellentesque fermentum dolor. Aliquam quam lectus, facilisis auctor, ultrices ut, elementum vulputate, nunc.</li>
</ul>
<p>Pellentesque habitant morbi tristique sene</p>
taxons_and_products_block:
channels:
- "FASHION_WEB"
productCodes:
- "666F_boyfriend_jeans_with_rips"
- "727F_patched_cropped_jeans"
- "111F_patched_jeans_with_fancy_badges"
taxons:
- "womens_jeans"
translations:
en_US:
name: "Womens jeans"
media:
options:
custom:
homepage_header_image:
type: image
path: "%fixtures_dir%/homepage_header.jpeg"
original_name: "homepage_header.jpeg"
channels:
- "FASHION_WEB"
translations:
en_US:
name: |
<a href="/en_US/page/about">This is a linked title</a>
alt: Homepage image media
content: |
<h3>Media description</h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</p>
homepage_video:
type: video
path: "%fixtures_dir%/homepage_video.mp4"
original_name: "homepage_video.mp4"
channels:
- "FASHION_WEB"
translations:
en_US:
name: |
Homepage video media
alt: Homepage video
content: |
<h3>Media description</h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</p>
homepage_pdf:
type: file
path: "%fixtures_dir%/BitBagOffer.pdf"
original_name: "BitBagOffer.pdf"
channels:
- "FASHION_WEB"
translations:
en_US:
name: Homepage PDF media
alt: BitBag offer
content: |
<h3>File description</h3>
<p>
The below button links to a PDF file.
Check it out! <i class="em em-slightly_smiling_face"></i>
</p>
size_table:
channels:
- "FASHION_WEB"
type: image
path: "%fixtures_dir%/size_table.jpeg"
original_name: "size_table.jpeg"
sale:
channels:
- "FASHION_WEB"
type: image
path: "%fixtures_dir%/sale.jpeg"
original_name: "sale.jpeg"
sections:
- "products"
media_with_products:
type: image
path: "%fixtures_dir%/homepage_header.jpeg"
original_name: "homepage_header.jpeg"
channels:
- "FASHION_WEB"
productCodes:
- "666F_boyfriend_jeans_with_rips"
- "727F_patched_cropped_jeans"
- "111F_patched_jeans_with_fancy_badges"
media_with_parameteres:
channels:
- "FASHION_WEB"
type: image
path: "%fixtures_dir%/homepage_header.jpeg"
original_name: "homepage_header.jpeg"
translations:
en_US:
name: Custom media template
content: "This is a custom media template to edit for your needs or create a completely new one."
page:
options:
custom:
lorem_ipsum:
channels:
- "FASHION_WEB"
number: 14
products: 5
sections:
- "blog"
translations:
en_US:
name: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Verba tu fingas et ea dicas, quae non sentias?"
name_when_linked: "Lorem ipsum dolor"
description_when_linked: "Lorem ipsum dolor sit amet, consectetur adipiscing elit..."
image_path: "%fixtures_dir%/homepage_header.jpeg"
content: |
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Verba tu fingas et ea dicas, quae non sentias? Fortitudinis quaedam praecepta sunt ac paene leges, quae effeminari virum vetant in dolore. Propter nos enim illam, non propter eam nosmet ipsos diligimus. At ego quem huic anteponam non audeo dicere; </p>
<p>Estne, quaeso, inquam, sitienti in bibendo voluptas? Duo Reges: constructio interrete. Quam si explicavisset, non tam haesitaret. Non enim ipsa genuit hominem, sed accepit a natura inchoatum. Conclusum est enim contra Cyrenaicos satis acute, nihil ad Epicurum. Quis istud, quaeso, nesciebat? Verum tamen cum de rebus grandioribus dicas, ipsae res verba rapiunt; </p>
<p>Quae cum praeponunt, ut sit aliqua rerum selectio, naturam videntur sequi; Ex quo intellegitur officium medium quiddam esse, quod neque in bonis ponatur neque in contrariis. Quid ergo hoc loco intellegit honestum? Ergo, si semel tristior effectus est, hilara vita amissa est? </p>
<p>Nam his libris eum malo quam reliquo ornatu villae delectari. Quid est, quod ab ea absolvi et perfici debeat? Ex quo, id quod omnes expetunt, beate vivendi ratio inveniri et comparari potest. Stoici scilicet. </p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Verba tu fingas et ea dicas, quae non sentias? Fortitudinis quaedam praecepta sunt ac paene leges, quae effeminari virum vetant in dolore. Propter nos enim illam, non propter eam nosmet ipsos diligimus. At ego quem huic anteponam non audeo dicere; </p>
<p>Estne, quaeso, inquam, sitienti in bibendo voluptas? Duo Reges: constructio interrete. Quam si explicavisset, non tam haesitaret. Non enim ipsa genuit hominem, sed accepit a natura inchoatum. Conclusum est enim contra Cyrenaicos satis acute, nihil ad Epicurum. Quis istud, quaeso, nesciebat? Verum tamen cum de rebus grandioribus dicas, ipsae res verba rapiunt; </p>
<p>Quae cum praeponunt, ut sit aliqua rerum selectio, naturam videntur sequi; Ex quo intellegitur officium medium quiddam esse, quod neque in bonis ponatur neque in contrariis. Quid ergo hoc loco intellegit honestum? Ergo, si semel tristior effectus est, hilara vita amissa est? </p>
<p>Nam his libris eum malo quam reliquo ornatu villae delectari. Quid est, quod ab ea absolvi et perfici debeat? Ex quo, id quod omnes expetunt, beate vivendi ratio inveniri et comparari potest. Stoici scilicet. </p>
about:
products: 5
channels:
- "FASHION_WEB"
sections:
- "general"
- "store"
translations:
en_US:
name: "About us"
slug: "about"
name_when_linked: "Read more about us"
description_when_linked: "Lorem ipsum dolor sit amet, consectetur adipiscing elit..."
content: |
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>
<ul>
<li>Morbi in sem quis dui placerat ornare. Pellentesque odio nisi, euismod in, pharetra a, ultricies in, diam. Sed arcu. Cras consequat.</li>
<li>Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus.</li>
<li>Phasellus ultrices nulla quis nibh. Quisque a lectus. Donec consectetuer ligula vulputate sem tristique cursus. Nam nulla quam, gravida non, commodo a, sodales sit amet, nisi.</li>
<li>Pellentesque fermentum dolor. Aliquam quam lectus, facilisis auctor, ultrices ut, elementum vulputate, nunc.</li>
</ul>
<p>Pellentesque habitant morbi tristique sene</p>
frequently_asked_question:
options:
custom:
lorem_ipsum:
channels:
- "FASHION_WEB"
number: 10
translations:
en_US:
question: |
Estne, quaeso, inquam, sitienti in bibendo voluptas?
answer: |
Nam his libris eum malo quam reliquo ornatu villae delectari. Quid est, quod ab ea absolvi et perfici debeat? Ex quo, id quod omnes expetunt, beate vivendi ratio inveniri et comparari potest. Stoici scilicet.