This repository has been archived by the owner on Oct 9, 2019. It is now read-only.
forked from dfritschy/cjw-summercamp-slides
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpresentation-output.html
1038 lines (862 loc) · 31.9 KB
/
presentation-output.html
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
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!--
Google IO 2012 HTML5 Slide Template
Authors: Eric Bidelman <[email protected]>
Luke Mahe <[email protected]>
URL: https://code.google.com/p/io-2012-slides
-->
<!DOCTYPE html>
<html>
<head>
<title>eZ Summercamp 2015</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<!--<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">-->
<!--<meta name="viewport" content="width=device-width, initial-scale=1.0">-->
<!--This one seems to work all the time, but really small on ipad-->
<!--<meta name="viewport" content="initial-scale=0.4">-->
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="stylesheet" media="all" href="theme/css/default.css">
<!--link rel="stylesheet" media="all" href="theme/css/app.css"-->
<link rel="stylesheet" media="only screen and (max-device-width: 480px)" href="theme/css/phone.css">
<base target="_blank"> <!-- This amazingness opens all links in a new tab. -->
<script data-main="js/slides" src="js/require-1.0.8.min.js"></script>
</head>
<body style="opacity: 0">
<slides class="layout-widescreen">
<slide class="logoslide nobackground">
<article class="flexbox vcenter">
<span><img src="images/cjwlogo.png" class="noshadow"></span>
</article>
</slide>
<slide class="title-slide segue nobackground">
<aside class="gdbar"><img src="images/cjwlogo_128.png" class="noshadow"></aside>
<!-- The content of this hgroup is replaced programmatically through the slide_config.json. -->
<hgroup class="auto-fadein">
<h1 data-config-title><!-- populated from slide_config.json --></h1>
<h2 data-config-subtitle><!-- populated from slide_config.json --></h2>
<p data-config-presenter><!-- populated from slide_config.json --></p>
</hgroup>
</slide>
<slide class="big" >
<hgroup>
<h2>Presenters</h2>
<h3></h3>
</hgroup>
<article ><!---
eZ Summercamp 2015 Talk
Multiple Colors of Migration
(c) 2015 Ekkehard Doerre, Donat Fritschy, Jan Meier, Martin Wilde, Felix Woldt, Dirk Lampe, Gabriel Werzner Regalado
-->
<ul class="build">
<li><strong>Ekke</strong> is a consultant with deep knowledge in eZ Publish 4 and 5, eZ Find / Apache Solr and with a faible for coming cutting edge web technologies. He is one of the organizers of the PHP Unconference since eight years.</li>
<li>
<p><strong>Donat</strong> is owner of Webmanufaktur, a full service web agency in Switzerland. He works as projects manager, software architect and developer and likes thinking outside of the box. In the last year he has been involved in major pure eZ 5 projects.</p>
</li>
<li>
<p>Members of CJW Network</p>
</li>
</ul></article>
</slide>
<slide >
<hgroup>
<h2>Multiple Colors of Migration</h2>
<h3></h3>
</hgroup>
<article ><ul>
<li>There are still many (too much) eZ Publish legacy sites </li>
<li>eZ Publish 5.4 / 2014.11 is supported until May 2019</li>
<li>So there is a stable business base for the next 4 years</li>
<li>And since one year in internet is seven years in real live, 28 years of best business!</li>
<li>
<p><strong>Why waiting? OK, we try to help you with arguments and know how</strong></p>
</li>
<li>
<p><a href="https://github.com/cjw-network/cjw-summercamp-slides/blob/master/Multiple-Colors-of-Migration.pdf">https://github.com/cjw-network/cjw-summercamp-slides/blob/master/Multiple-Colors-of-Migration.pdf</a></p>
</li>
</ul></article>
</slide>
<slide >
<hgroup>
<h2>Who is in the audience?</h2>
<h3>Let us know you better ...</h3>
</hgroup>
<article ><ul>
<li>Who has realized eZ Publish 5 sites (productive)?</li>
<li>Who has realized pure eZ Publish 5 sites (no legacy)?</li>
</ul></article>
</slide>
<slide >
<hgroup>
<h2>Agenda</h2>
<h3></h3>
</hgroup>
<article ><p>Things we would like to discuss:</p>
<ul>
<li>Reasons for not waiting any more</li>
<li>Run legacy only</li>
<li>Run eZ Publih 5 Symfony stack only</li>
<li>Your fast (easy) way to pure TWIG Templates</li>
<li>If there is time: Multi-Site/Multi-Repository Setup</li>
</ul></article>
</slide>
<slide class="segue dark nobackground" >
<aside class="gdbar"><img src="images/cjwlogo_128.png" class="noshadow"></aside>
<hgroup class="auto-fadein">
<h2>Why waiting?</h2>
<h3>Pro and cons</h3>
</hgroup>
</slide>
<slide >
<hgroup>
<h2>What are the problems?</h2>
<h3>Still hard to start but we prepared a lot</h3>
</hgroup>
<article ><ul>
<li>no starting point: a good eZ Publish version like 4.7 is missing -> cjwpublish1411</li>
<li><a href="https://github.com/cjw-network/cjwpublish1411">https://github.com/cjw-network/cjwpublish1411</a></li>
<li>many logic is in templates, everything new, everything different?</li>
<li>no multi site / multi repository setup</li>
<li>performance, performance, performance,</li>
</ul></article>
</slide>
<slide >
<hgroup>
<h2>Why waiting?</h2>
<h3>Financial reasons - How to sell it to your customer?</h3>
</hgroup>
<article ><ul>
<li>update / upgrade - but still no new feature for editors</li>
<li>
<p>many security fixes - but often part of maintenance support</p>
</li>
<li>
<p>Relaunch: Make responsive, look at <a href="http://getbootstrap.com">http://getbootstrap.com</a> or <a href="http://foundation.zurb.com/">http://foundation.zurb.com/</a></p>
</li>
<li>Relaunch: Mobile first, it is coming to marketing people</li>
<li>new feature mobile editing</li>
<li>Do you have one more?</li>
</ul></article>
</slide>
<slide >
<hgroup>
<h2>Why waiting?</h2>
<h3>Technical reasons for starting now</h3>
</hgroup>
<article ><ul>
<li>it is on the upgrade path to eZ Platform 6</li>
<li>many security and bug fixes</li>
<li>TWIG for new templates and fallback to old templates when needed</li>
<li>easy to extend with Symfony bundles, there are more than 2500 on e.g. <a href="http://knpbundles.com/">http://knpbundles.com/</a></li>
<li>switch to responsive web design and make it mobile first</li>
</ul></article>
</slide>
<slide >
<hgroup>
<h2>Which version to use?</h2>
<h3>We need a version as a stable base for the next 4 years</h3>
</hgroup>
<article ><ul>
<li>eZ Publish 5.3 / 5.4 aka 2014.11 is supported until May 2019</li>
<li>but many fixes are in the legacy bridge (-)</li>
<li>but newer versions are pre alpha (+)</li>
<li>but there is no real save version to switch (-)</li>
<li>solution take our cjwpublish1411 and help to keep it fresh (+)</li>
</ul></article>
</slide>
<slide class="segue dark nobackground" >
<aside class="gdbar"><img src="images/cjwlogo_128.png" class="noshadow"></aside>
<hgroup class="auto-fadein">
<h2>Run legacy only</h2>
<h3></h3>
</hgroup>
</slide>
<slide >
<hgroup>
<h2>Run legacy only</h2>
<h3>Short introduction</h3>
</hgroup>
<article ><ul>
<li>if you only need the bug fixes and security patches in legacy</li>
<li>our arguments won't convince you or your customer</li>
<li>the installation has more than 150 extensions</li>
<li>then link your requests into the legacy folder</li>
<li>go the upgrade path <a href="https://doc.ez.no/display/EZP/Upgrade">https://doc.ez.no/display/EZP/Upgrade</a></li>
<li>and read more <a href="https://doc.ez.no/display/EZP/Legacy+code+and+features">https://doc.ez.no/display/EZP/Legacy+code+and+features</a></li>
<li>but we advice you to go to "Run Symfony only"</li>
</ul></article>
</slide>
<slide class="segue dark nobackground" >
<aside class="gdbar"><img src="images/cjwlogo_128.png" class="noshadow"></aside>
<hgroup class="auto-fadein">
<h2>Run Symfony only</h2>
<h3></h3>
</hgroup>
</slide>
<slide >
<hgroup>
<h2>Team up with a Symfony crack</h2>
<h3></h3>
</hgroup>
<article ><ul>
<li>To be honest: as eZ 4 developers, we are complete novices in eZ 5</li>
<li>It's easier for a Symfony crack to learn eZ than other way round</li>
<li>Symfony community is hungry for a CMS, so watch out for new competition</li>
<li>But @Symfony cracks: It's not easy: an eZ Publish and CMS expert will reduce your risk</li>
<li>And will make your content architecture better and more maintainable</li>
<li><strong>OR take the shortcut for integrators</strong></li>
</ul></article>
</slide>
<slide class="segue dark nobackground" >
<aside class="gdbar"><img src="images/cjwlogo_128.png" class="noshadow"></aside>
<hgroup class="auto-fadein">
<h2>CjwPublishToolsBundle</h2>
<h3>Your easy way to eZ Publish Symfony</h3>
</hgroup>
</slide>
<slide >
<hgroup>
<h2>CjwPublishToolsBundle</h2>
<h3>for integrators of small to medium sites</h3>
</hgroup>
<article ><ul>
<li>He comes from front end design and speaks fluent HTML and CSS</li>
<li>He has no problems with digging into template languages</li>
<li>He prefers solutions with all needed functionality</li>
<li>He wants to develop web sites fast and easy at low cost</li>
<li><a href="https://github.com/cjw-network/CjwPublishToolsBundle">https://github.com/cjw-network/CjwPublishToolsBundle</a></li>
<li>go with it: </Applications/MAMP/htdocs/cjw-summercamp-preparation/cjwpublish1411/src/Cjw/SiteCjwpublishBundle></li>
</ul></article>
</slide>
<slide >
<hgroup>
<h2>Treemenu</h2>
<h3></h3>
</hgroup>
<article ><p><img src="images/treemenu.png" alt="" width="613" style="margin-top:-30px"></p>
<li>
<pre class="prettyprint" data-lang="Twig">
{% set treemenu = cjw_treemenu( locationId, {
'depth': '2',
'offset': '1',
'include': [ 'cjw_article', 'cjw_folder', 'cjw_feedback_form' ],
'sortby': { 'LocationPriority': 'ASC' },
'datamap': false } ) %}
</pre>
</li>
<li>
<pre class="prettyprint" data-lang="Twig">
{% for item in treemenu %}
{{ ez_content_name( item.node.contentInfo ) }}
{% endfor %}
</pre>
</li></article>
</slide>
<slide >
<hgroup>
<h2>Breadcrumb</h2>
<h3>cjw_breadcrumb</h3>
</hgroup>
<article ><p><img src="images/breadcrumb.png" alt="" width="421" style="margin-top:-30px"></p>
<li>
<pre class="prettyprint" data-lang="Twig">
{% set path = cjw_breadcrumb( locationId, { 'offset': '1',
'rootName': 'Home',
'separator': '' } ) %}
{% for item in path.items %}
{{ item.name }}
{% endfor %}
</pre>
</li></article>
</slide>
<slide >
<hgroup>
<h2>Folder with line view screenshot</h2>
<h3></h3>
</hgroup>
<article ><p><img src="images/folder_with_line_view.png" alt="" width="527" style="margin-top:-30px"></p></article>
</slide>
<slide >
<hgroup>
<h2>Folder with line view source code</h2>
<h3>cjw_fetch_content</h3>
</hgroup>
<article ><li>
<pre class="prettyprint" data-lang="Twig">
{% set listChildren = cjw_fetch_content( [ location.id ], { 'depth': '1',
'limit': listLimit,
'offset': listOffset,
'include': [ 'cjw_folder', 'cjw_article', 'cjw_folder_section', 'cjw_file' ],
'language': [],
'datamap': false,
'count': true } )[ location.id ] %}
</pre>
</li>
<li>
<pre class="prettyprint" data-lang="Twig">
{% for child in listChildren['children'] %}
{#{{ render( controller( "ez_content:viewLocation",
{'location': child, 'viewType': 'line'} ) ) }}#}
{{ cjw_render_location( {'location': child, 'viewType': 'line'} ) }}
{% endfor %}
</pre>
</li></article>
</slide>
<slide class="smaller" >
<hgroup>
<h2>content fetch ezp 4.x smarty</h2>
<h3></h3>
</hgroup>
<article ><li>
<pre class="prettyprint" data-lang="tpl">
{def $node_id = 2
$limit = 10
$offset = 10
$depth = 5
$include = array( 'article' )
$list_items = fetch( 'content', 'list', hash( 'parent_node_id', $node_id,
'depth', $depth,
'limit', $limit,
'offset', $offset,
'class_filter_type', 'include',
'class_filter_array', $include,
'sort_by', array( 'published', true() ) ) )
$list_count = fetch( 'content', 'list_count', hash( 'parent_node_id', $node_id,
'depth': $depth,
'class_filter_type', 'include',
'class_filter_array', $include ) )
$parent_node = fetch( 'content', 'node', hash( 'node_id', $node_id ) ) }
{foreach $list_items as $item}
{$item|attribute( show, 5 )}
{/foreach}
</pre>
</li></article>
</slide>
<slide class="smaller" >
<hgroup>
<h2>cjw_content_fetch ezp 5.x twig</h2>
<h3></h3>
</hgroup>
<article ><li>
<pre class="prettyprint" data-lang="twig">
{% set location_id = 2 %}
{% set limit = 10 %}
{% set offset = 10 %}
{% set include = [ 'article' ] %}
{% set depth = 5 %}
{% set content_object = false %}
{% set list_items = cjw_fetch_content( [ location_id ], { 'depth': depth,
'limit': limit,
'offset': offset,
'include': include,
'sortby': [ [ 'DatePublished', 'DESC' ] ],
'parent': true,
'count': true } ) %}
{% set list_count = list_items[ location_id ][ 'count' ] %}
{% set parent_location = list_items[ location_id ][ 'parent' ] %}
{% for item in list_items[ location_id ][ 'children' ] %}
{# show the location object, if you use the "'datamap': true" parameter, this will show the content object #}
{{ dump( item ) }}
{# example for getting the content object for this location, if needed #}
{#
{% set content_object = cjw_load_content_by_id( item.contentInfo.id ) %}
{{ dump( content_object ) }}
#}
{% endfor %}
</pre>
</li></article>
</slide>
<slide >
<hgroup>
<h2>Pagination (was called Google navigator)</h2>
<h3></h3>
</hgroup>
<article ><p><img src="images/pagination.png" alt="" width="529" style="margin-top:-50px"></p>
<ul>
<li>Twig Template</li>
<li><a href="https://github.com/cjw-network/CjwPublishToolsBundle/blob/master/Resources/views/parts/navigator.html.twig">https://github.com/cjw-network/CjwPublishToolsBundle/blob/master/Resources/views/parts/navigator.html.twig</a></li>
</ul></article>
</slide>
<slide >
<hgroup>
<h2>Article full view screenshot</h2>
<h3></h3>
</hgroup>
<article ><p><img src="images/article_full_view.png" alt="" width="680" style="margin-top:-30px"></p></article>
</slide>
<slide class="smaller" >
<hgroup>
<h2>Article full view source code</h2>
<h3></h3>
</hgroup>
<article ><li>
<pre class="prettyprint" data-lang="Twig">
{% extends site_bundle_name ~ '::pagelayout.html.twig' %}
{% block content %}
{% if content.fields.title is defined and not ez_is_field_empty( content, 'title' ) %}
{{ ez_field_value( content, 'title' ) }}
{% endif %}
{% if content.fields.short_description is defined and not ez_is_field_empty( content, 'short_description' ) %}
{{ ez_render_field( content, 'short_description' ) }}
{% endif %}
{% if content.fields.image is defined and not ez_is_field_empty( content, 'image' ) %}
{{ ez_render_field( content, 'image',
{parameters: {alias: 'medium', class: 'imageleft'}} ) }}
{% endif %}
{% endblock %}
</pre>
</li></article>
</slide>
<slide >
<hgroup>
<h2></h2>
<h3></h3>
</hgroup>
<article ><p>title: Feedback Form (infocollector) I
subtitle: what is it doing</p>
<ul>
<li><em>cjw_feedback_form</em> with infocollector using CjwPublishToolsBundle eZP content type mapping to symfony form handling</li>
<li>
<p>Symfony form validation and form rendering is used</p>
</li>
<li>
<p>ez contenttype <em>cjw_feedback_form</em> with infocollector attributes will be render a symfony form which will store content into infocollector table and will send an email</p>
</li>
</ul></article>
</slide>
<slide >
<hgroup>
<h2>Feedback Form (infocollector) II</h2>
<h3></h3>
</hgroup>
<article ><p>Define custom formbuilder.yml which will be load for this project
src/Cjw/SiteCjwpublishBundle/app/config/parameters.yml</p>
<p><li>
<pre class="prettyprint" data-lang="yaml"> <br />
parameters:
# Filepath + -name for formbuilder Config, from EZROOT directory
# => sitaccessaware config
# set default config for all siteaccesses can be overitten by siteaccess
# or siteaccessgroup if you need a separate formbuilderconfig
cjw_publishtools.default.formbuilder.config_file:
src/Cjw/SiteCjwpublishBundle/Resources/config/formbuilder.yml
</pre>
</li></p></article>
</slide>
<slide >
<hgroup>
<h2>Feedback Form (infocollector) III</h2>
<h3></h3>
</hgroup>
<article ><p>example for defining an infocollector for of ezpublish content type / class 'cjw_feedback_form
src/Cjw/SiteCjwpublishBundle/Resources/config/formbuilder.yml</p>
<p><li>
<pre class="prettyprint" data-lang="yaml">
formcollector_config:
parameters:
button_config:
save_button:
label: cjw_publishtools.formbuilder.default.button.send
cancel_button: false
types:
cjw_feedback_form:
handler:
infocollector:
success:
template: :form:success.html.twig
sendmail:
email_sender: [email protected]
email_subject: 'Collected Information from cjwpublish.com'</p>
<p></pre>
</li></p></article>
</slide>
<slide >
<hgroup>
<h2>Feedback form - template</h2>
<h3></h3>
</hgroup>
<article ><ul>
<li>take the standard Symfony form(form) in TWIG template</li>
</ul>
<li>
<pre class="prettyprint" data-lang="twig">
{% extends site_bundle_name ~ '::pagelayout.html.twig' %}
{% block content %}
{{ form(form) }}
{% endblock %}
</pre>
</li></article>
</slide>
<slide >
<hgroup>
<h2>formbuilder</h2>
<h3></h3>
</hgroup>
<article ><ul>
<li>forms can be defined in a yaml file or as a content class with infocollector fields</li>
<li>stackable handler: send email, add to infocollector (needs orm), success</li>
<li>forms defined via content classes can use the eZ Publish build in template override mechanism</li>
<li>easy to use frontend editing (add and edit content)</li>
<li>easy to use user register</li>
<li><strong>hacking php classes is not needed</strong></li>
</ul></article>
</slide>
<slide >
<hgroup>
<h2>Frontend editing Edit User - configuration</h2>
<h3></h3>
</hgroup>
<article ><ul>
<li>src/Cjw/SiteCjwpublishBundle/Resources/config/formbuilder.yml
<li>
<pre class="prettyprint" data-lang="YAML">
frontendediting_config:
parameters:
template: :edit.html.twig
handler:
success:
handler_class: successHandler
template: ':email:user_register.html.twig'
types:
cjw_user:
parameters:
template: :user:edit.html.twig
handler:
fields:
- first_name
- last_name
- user_account
</pre>
</li></li>
</ul></article>
</slide>
<slide >
<hgroup>
<h2>Frontend editing Edit User - template</h2>
<h3></h3>
</hgroup>
<article ><ul>
<li>take the standard Symfony form(form) in TWIG template</li>
</ul>
<li>
<pre class="prettyprint" data-lang="twig">
{% extends site_bundle_name ~ '::pagelayout.html.twig' %}
{% block content %}
{{ form(form) }}
{% endblock %}
</pre>
</li></article>
</slide>
<slide >
<hgroup>
<h2>A short walk through to Multi language</h2>
<h3></h3>
</hgroup>
<article ><p><img src="images/en-de-01.png" alt="" width="400px" style="margin-top:-30px"></p>
<ul>
<li><a href="http://www.cjwpublish.com/">http://www.cjwpublish.com/</a> => en</li>
<li><a href="http://www.cjwpublish.com/en">http://www.cjwpublish.com/en</a> </li>
<li>
<p><a href="http://www.cjwpublish.com/de">http://www.cjwpublish.com/de</a></p>
</li>
<li>
<p><a href="http://www.cjwpublish.com/admin_en">http://www.cjwpublish.com/admin_en</a> or <a href="http://www.cjwpublish.com/admin_de">http://www.cjwpublish.com/admin_de</a></p>
</li>
</ul></article>
</slide>
<slide >
<hgroup>
<h2>A short walk through to multi language</h2>
<h3>Using the translation system.</h3>
</hgroup>
<article ><ul>
<li>
<p>translations for static strings => formbuilder uses the trans system from symfony</p>
</li>
<li>
<p>src/Cjw/PublishToolsBundle/Resources/translations/messages.de.yml <em>Deutsch</em> </p>
</li>
<li>src/Cjw/PublishToolsBundle/Resources/translations/messages.en.yml <em>English</em></li>
</ul></article>
</slide>
<slide >
<hgroup>
<h2>A short walk through to multi language</h2>
<h3>How to translate strings using the messages file.</h3>
</hgroup>
<article ><ul>
<li>../Resources/translations/messages.de.yml
<li>
<pre class="prettyprint" data-lang="yaml">
cjw_publishtools.formbuilder.user.email: 'Die E-Mail-Adresse'
</pre>
</li></li>
<li>../Resources/translations/messages.en.yml
<li>
<pre class="prettyprint" data-lang="yaml">
cjw_publishtools.formbuilder.user.email: 'E-Mail-Address'
</pre>
</li></li>
<li>TWIG template
<li>
<pre class="prettyprint" data-lang="twig">
{{ 'cjw_publishtools.formbuilder.user.email'|trans }}
</pre>
</li></li>
</ul></article>
</slide>
<slide >
<hgroup>
<h2>Performance</h2>
<h3>cjw_render_location vs. subcontroller calls</h3>
</hgroup>
<article ><ul>
<li>
<p>e.g. <em>render( controller( ...</em> calls in twig => every subcontroller call costs a lot of time
between 30 - 100 ms so for a loop with 10 line view you can often save <strong>1 second</strong> ! if you use a normal template include or our</p>
</li>
<li>
<p><em>cjw_render_location twig</em> function which uses the override system from ez like the render( controller( "ez_content:viewLocation", {'location': child, 'viewType': 'line'} uses</p>
</li>
<li><em>avoid stash calls</em> if you can e.g. to give the location or content as an parameter in stead of the location id</li>
</ul></article>
</slide>
<slide class="segue dark nobackground" >
<aside class="gdbar"><img src="images/cjwlogo_128.png" class="noshadow"></aside>
<hgroup class="auto-fadein">
<h2>Multi-Site/Multi-Repository Setup</h2>
<h3></h3>
</hgroup>
</slide>
<slide >
<hgroup>
<h2>Why a Multi-Site/Multi-Repository Setup?</h2>
<h3></h3>
</hgroup>
<article ><ul>
<li>At CJW Network we have developed a multi-site/multi-repository setup for eZ Publish 4 several years ago</li>
<li>This allows us to host many individual sites on a single eZ Publish installation</li>
</ul>
<p>Advantages:</p>
<ul>
<li>Central site administration (site activation, cronjobs, ...)</li>
<li>Easy deployment (update site extension with Subversion)</li>
<li>Highly reduced maintenance costs (security patches, upgrades)</li>
<li>Highly efficient use of hardware resources</li>
</ul>
<p>Disadvantages:</p>
<ul>
<li>Some Kernel patches needed</li>
</ul></article>
</slide>
<slide >
<hgroup>
<h2>Multi-Site/Multi-Repository Setup in eZ 5</h2>
<h3></h3>
</hgroup>
<article ><p><em>First Approach 2014 (proven in production and depreciated)</em></p>
<ul class="build fade">
<li class="fade"><em>Use different ezpublish app directories to host the different sites</em></li>
</ul>
<p><strong>Second approach 2015 (proven in production)</strong></p>
<ul class="build fade">
<li class="fade">Use <code>CJW MultiSiteBundle</code></li>
<li class="fade"><a href="https://github.com/cjw-network/cjwpublish1411/tree/master/src/Cjw/MultiSiteBundle">https://github.com/cjw-network/cjwpublish1411/tree/master/src/Cjw/MultiSiteBundle</a></li>
</ul></article>
</slide>
<slide >
<hgroup>
<h2>CJW MultiSiteBundle Features</h2>
<h3></h3>
</hgroup>
<article ><ul>
<li>Boots kernel and environment based on domain name mappings</li>
<li>Handles local, staging and live domain names</li>
<li>Allows for global activation of bundles</li>
<li>Allows for global settings</li>
<li>Provides a common console for all sites</li>
<li>Caches domain name mappings</li>
<li>Moves cache and log files away from the ezpublish folder</li>
<li>more to come ...</li>
</ul></article>
</slide>
<slide >
<hgroup>
<h2>Directory structure</h2>
<h3></h3>
</hgroup>
<article ><p>The name of the project is <code>cjwpublish</code>.</p>
<ul>
<li>Bundle: <em>src/Cjw/CjwSiteCjwpublishBundle</em></li>
<li>ProjectName: <em>cjwpublish</em></li>
<li>VarFolder: <em>ezpublish_legacy/var/cjwpublish</em></li>
<li>CacheFolder: <em>ezpublish_legacy/var_cache/cjwpublish</em></li>
<li>LogFolder: <em>ezpublish_legacy/var_log/cjwpublish</em></li>
</ul></article>
</slide>
<slide >
<hgroup>
<h2>Prod and Dev Environment -> Prod</h2>
<h3></h3>
</hgroup>
<article ><p>Access to english/german frontend and backend siteaccesses</p>
<p>Production:</p>
<pre><code>http://www.cjwpublish.com/ => en
http://www.cjwpublish.com/en
http://www.cjwpublish.com/de
http://www.cjwpublish.com/admin_en
http://www.cjwpublish.com/admin_de
</code></pre></article>
</slide>
<slide >
<hgroup>
<h2>Prod and Dev Environment -> Dev</h2>
<h3></h3>
</hgroup>
<article ><ul>
<li>Development: MatchingRule matching begins with <em>www.cjwpublish.com.</em>/de* is matching de german siteaccess</li>
<li>so every developer can be access if the dev computer can be access by default local dns entry </li>
<li>e.g. <em>.fw.lokal and if the vhost matches all </em>.cjwpublish1411.*</li>
<li>
<p>the following url can be accessed</p>
<p>http://www.cjwpublish.com.cjwpublish1411dev.fw.lokal/ => en
http://www.cjwpublish.com.cjwpublish1411dev.fw.lokal/en<br />
http://www.cjwpublish.com.cjwpublish1411dev.fw.lokal/de</p>
<p>http://www.cjwpublish.com.cjwpublish1411dev.fw.lokal/admin_en
http://www.cjwpublish.com.cjwpublish1411dev.fw.lokal/admin_de</p>
</li>
</ul></article>
</slide>
<slide >
<hgroup>
<h2>Access to multisite ezpublish console</h2>
<h3></h3>
</hgroup>
<article ><p>is the same as php ezpublish/console but only for multitsitesetup to call the kernel from src/Cjw/CjwSiteCjwpublishBundle</p>
<li>
<pre class="prettyprint" data-lang="bash">
php cjwpublish/console-cjwpublish
php cjwpublish/console-$ProjectName
</pre>
</li></article>
</slide>
<slide >
<hgroup>
<h2>de / en siteaccess host/uri matching I</h2>
<h3></h3>
</hgroup>
<article ><li>
<pre class="prettyprint" data-lang="yaml">
# src/Cjw/SiteCjwpublishBundle/Resources/config/site.yml
ezpublish:
siteaccess:
# cjwpublish_user__en
default_siteaccess: %cjwsite.name.project%_user__en
list:
- %cjwsite.name.project%_user__en
- %cjwsite.name.project%_user__de
- %cjwsite.name.project%_admin__en
- %cjwsite.name.project%_admin__de
groups:
%cjwsite.name.project%_user_group:
- %cjwsite.name.project%_user__en
- %cjwsite.name.project%_user__de
%cjwsite.name.project%_admin_group:
- %cjwsite.name.project%_admin__en
- %cjwsite.name.project%_admin__de
</pre>
</li></article>
</slide>
<slide >
<hgroup>
<h2>de / en siteaccess host/uri matching II</h2>
<h3></h3>
</hgroup>
<article ><li>
<pre class="prettyprint" data-lang="yaml">
# src/Cjw/SiteCjwpublishBundle/Resources/config/site.yml
# https://doc.ez.no/display/EZP/Siteaccess+Matching
match:
# www.cjwpublish.com.cjwpublish1411.fw.lokal \Cjw\MultiSiteBundle\Matcher\MapHost: => begins_with
# www.cjwpublish.com.cjwpublish1411.fw.lokal/de/ => www.cjwpublish.com/de => siteaccess: cjwpublish_user__de
# www.cjwpublish.com.cjwpublish1411.fw.lokal/ => www.cjwpublish.com/en/(default) => default uri en => siteaccess: cjwpublish_user__en
\Cjw\MultiSiteBundle\Matcher\MapHostURI:
www.cjwpublish.com/en/(default): %cjwsite.name.project%_user__en
www.cjwpublish.com/de: %cjwsite.name.project%_user__de
www.cjwpublish.com/admin_en: %cjwsite.name.project%_admin__en
www.cjwpublish.com/admin_de: %cjwsite.name.project%_admin__de
cjwpublish.com/en/(default): %cjwsite.name.project%_user__en
cjwpublish.com/de: %cjwsite.name.project%_user__de
cjwpublish.com/admin_en: %cjwsite.name.project%_admin__en
cjwpublish.com/admin_de: %cjwsite.name.project%_admin__de
</pre>
</li></article>
</slide>
<slide >
<hgroup>
<h2>Ressources</h2>
<h3></h3>
</hgroup>
<article ><p>Slides as PDF</p>
<ul>
<li><a href="https://github.com/cjw-network/cjw-summercamp-slides/blob/master/Multiple-Colors-of-Migration.pdf">https://github.com/cjw-network/cjw-summercamp-slides/blob/master/Multiple-Colors-of-Migration.pdf</a></li>
</ul>
<p>Slides (Source)</p>
<ul>
<li><a href="https://github.com/cjw-network/cjw-summercamp-slides">https://github.com/cjw-network/cjw-summercamp-slides</a></li>
</ul>
<p>CJW MultiSiteBundle</p>
<ul>
<li><a href="https://github.com/cjw-network/cjwpublish1411/tree/master/src/Cjw/MultiSiteBundle">https://github.com/cjw-network/cjwpublish1411/tree/master/src/Cjw/MultiSiteBundle</a></li>
</ul>
<p>CJW Publish for quick start</p>
<ul>
<li><a href="https://github.com/cjw-network/cjwpublish1411">https://github.com/cjw-network/cjwpublish1411</a> | <a href="https://joind.in/15118">https://joind.in/15118</a></li>
</ul></article>
</slide>
<slide class="segue dark nobackground" >
<aside class="gdbar"><img src="images/cjwlogo_128.png" class="noshadow"></aside>
<hgroup class="auto-fadein">
<h2><a href="http://events.netgen.io/" style="color:#fff;">http://events.netgen.io/</a></h2>
<h3>Please Vote!</h3>
</hgroup>
</slide>
<slide class="thank-you-slide segue nobackground">
<aside class="gdbar right"><img src="images/cjwlogo_128.png" class="noshadow"></aside>
<article class="flexbox vleft auto-fadein">
<h2><Thank You!></h2>
<p>Ekkehard Dörre<br>
<a href="http://share.ez.no/community/profile/7431">http://share.ez.no/community/profile/7431</a><br>
<a href="https://twitter.com/ekkeD">@ekkeD</a><br>