Slide 1

Slide 1 text

RogerCms A developer friendly CMS by Benjamin Grandfond & Marek Kalnik 1 1

Slide 2

Slide 2 text

About us 2 2

Slide 3

Slide 3 text

Benjamin Grandfond @benjaM1 http://github.com/benja-M-1 http://benjamingrandfond.fr • Project Manager @ Theodo • Symfony user since 2009 • Creator of Symfttpd [symfy] 2.0 • Creator of http://parisstreetpingpong.fr 3 3

Slide 4

Slide 4 text

Marek Kalnik @marekkalnik http://github.com/marekkalnik http://marekkalnik.tumblr.com • Lead Developer @ Theodo • Release Manager for RogerCMS • Zend Certified PHP 5.3 Engineer • JavaScript junkie 4 4

Slide 5

Slide 5 text

Why? 5 5

Slide 6

Slide 6 text

The idea 6 • we need a tool to let our clients modify those "about us" pages (or phone numbers) • we don't want them touch anything else • we want to keep our templates where we like them to be (in the project directory, as static files) 6

Slide 7

Slide 7 text

The idea • we need a tool to let our clients modify those "about us" pages (or phone numbers) • we don't want them touch anything else • we want to keep our templates where we like them to be (in the project directory, as static files) 7 7

Slide 8

Slide 8 text

The idea • we need a tool to let our clients modify those "about us" pages (or phone numbers) • we don't want them touch anything else • we want to keep our templates where we like them to be (in the project directory, as static files) 8 8

Slide 9

Slide 9 text

The idea • we need a tool to let our clients modify those "about us" pages (or phone numbers) • we don't want them touch anything else • we want to keep our templates where we like them to be (in the project directory, as static files) 9 9

Slide 10

Slide 10 text

The idea • we need a tool to let our clients modify those "about us" pages (or phone numbers) • we don't want them touch anything else • we want to keep our templates where we like them to be (in the project directory, as static files) So we want a CMS that can be easily integrated into a Symfony project. 10 10

Slide 11

Slide 11 text

History 11 11

Slide 12

Slide 12 text

History Fabien Potencier to Fabrice Bernhard: "I really like how RadiantCMS is made, I think it would be great to make a Symfony2 CMS like that. Could you do that?" 12 12

Slide 13

Slide 13 text

History Fabrice Bernhard: 13 13

Slide 14

Slide 14 text

History 14 14

Slide 15

Slide 15 text

History • started summer 2011 right after Symfony 2.0 release • first Symfony2 project @Theodo • used in several projects like www.smartangels.fr, www.epigraf.com.pl • made us contribute to Symfony ;) • publicly released on Github december 2011 15 15

Slide 16

Slide 16 text

History • started summer 2011 right after Symfony 2.0 release • first Symfony2 project @Theodo • used in several projects like www.smartangels.fr, www.epigraf.com.pl • made us contribute to Symfony ;) • publicly released on Github december 2011 16 16

Slide 17

Slide 17 text

History • started summer 2011 right after Symfony 2.0 release • first Symfony2 project @Theodo • used in several projects like www.smartangels.fr, www.epigraf.com.pl • made us contribute to Symfony ;) • publicly released on Github december 2011 17 17

Slide 18

Slide 18 text

History • started summer 2011 right after Symfony 2.0 release • first Symfony2 project @Theodo • used in several projects like www.smartangels.fr, www.epigraf.com.pl • made us contribute to Symfony ;) • publicly released on Github december 2011 18 18

Slide 19

Slide 19 text

• started summer 2011 right after Symfony 2.0 release • first Symfony2 project @Theodo • used in several projects like www.smartangels.fr, www.epigraf.com.pl • made us contribute to Symfony ;) • publicly released on Github december 2011 History 19 19

Slide 20

Slide 20 text

History • started summer 2011 right after Symfony 2.0 release • first Symfony2 project @Theodo • used in several projects like www.smartangels.fr, www.epigraf.com.pl • made us contribute to Symfony ;) • publicly released on Github december 2011 20 20

Slide 21

Slide 21 text

History 21 21

Slide 22

Slide 22 text

How does it work? 22 22

Slide 23

Slide 23 text

It’s twig 23 How does it work? {# layout ‘normal’ #} {% block title %}No title{% endblock %}
{% block content %}{% endblock %}

{% block footer %}{% endblock %}
23

Slide 24

Slide 24 text

24 {# Your template #} {% extends "layout:name" %}
{% block content %} bar content {% endblock %}
Using of layout from the CMS It’s twig How does it work? 24

Slide 25

Slide 25 text

It’s developer friendly 25 public function pageAction() { // ... $page = $this->get('roger.content_repository')->getPageBySlug('contact'); $variables = array( 'form' => $form->createView(), ); return $this->get('roger.templating') ->renderResponse('page:'.$page->getName(), array('page' => $page) + $variables); } Injecting variables into a CMS page Using pages in controllers How does it work? 25

Slide 26

Slide 26 text

4 objects 26 How does it work? 26

Slide 27

Slide 27 text

layout 27 • HTML page structure • declare Twig blocks How does it work? 27

Slide 28

Slide 28 text

page 28 • add content to Twig blocks • set up HTML metas • configure the page cache • publish / draft • link to other pages How does it work? 28

Slide 29

Slide 29 text

snippet 29 • special Twig tag • add shared content (copyrights, ...) How does it work? 29

Slide 30

Slide 30 text

media 30 • manage images How does it work? 30

Slide 31

Slide 31 text

layout page

this is foo content

Hello
{% snippet ‘foosnip’ %} {% block foo %}{% endblock %} {% block bar %}{% endblock %} {% block baz %}{% endblock %} snippet This is a sample block ‘bar’ block ‘foo’ 31 How does it work? 31

Slide 32

Slide 32 text

Routing 32 Products Rackets Performance products rackets performance Pages Slugs Urls http://tennis.foo.com/products http://tennis.foo.com/products/rackets http://tennis.foo.com/products/rackets/performance How does it work? 32

Slide 33

Slide 33 text

Routing 33 Products Rackets Performance products rackets performance Pages Slugs Urls http://tennis.foo.com/products http://tennis.foo.com/products/rackets http://tennis.foo.com/products/rackets/performance How does it work? 33

Slide 34

Slide 34 text

Routing 34 Products Rackets Performance products rackets performance Pages Slugs Urls http://tennis.foo.com/products http://tennis.foo.com/products/rackets http://tennis.foo.com/products/rackets/performance How does it work? 34

Slide 35

Slide 35 text

Routing 35 Products Rackets Performance products rackets performance Pages Slugs Urls http://tennis.foo.com/products http://tennis.foo.com/products/rackets http://tennis.foo.com/products/rackets/performance How does it work? 35

Slide 36

Slide 36 text

Security? 36 36

Slide 37

Slide 37 text

Security? • based in Symfony2 security system • need more? Have you tried FOSUserBundle? :) 37 37

Slide 38

Slide 38 text

Security? • based in Symfony2 security system • need more? Have you tried FOSUserBundle? :) 38 38

Slide 39

Slide 39 text

Security? • based in Symfony2 security system • need more? Have you tried FOSUserBundle? :) 39 39

Slide 40

Slide 40 text

Security? 40 Only roles matter! role_hierarchy: ROLE_ROGER_CONTENT: [ROLE_ROGER_READ_CONTENT, ROLE_ROGER_WRITE_CONTENT, ROLE_ROGER_DELETE_CONTENT, ROLE_ROGER_PUBLISH_CONTENT] ROLE_ROGER_DESIGN: [ROLE_ROGER_READ_DESIGN, ROLE_ROGER_WRITE_DESIGN, ROLE_ROGER_DELETE_DESIGN] ROLE_ROGER_EDITOR: [ROLE_ROGER_CONTENT, ROLE_ROGER_READ_DESIGN, ROLE_ROGER_PUBLISHER] ROLE_ROGER_DESIGNER: [ROLE_ROGER_CONTENT, ROLE_ROGER_DESIGN, ROLE_ROGER_PUBLISHER] ROLE_ADMIN: [ROLE_USER, ROLE_ROGER_DESIGNER, ROLE_ROGER_EDITOR] ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH] 40

Slide 41

Slide 41 text

Demo time :) 41 41

Slide 42

Slide 42 text

Demo :) 42 Just like that (Or see the project's sandbox) https://github.com/theodo/rogercms-sandbox 42

Slide 43

Slide 43 text

Thank you! 43 43

Slide 44

Slide 44 text

Questions 44 Contribute! https://github.com/theodo/TheodoRogerCmsBundle https://github.com/theodo/rogercms-sandbox Feedback! @benjaM1 @marekkalnik 44