2017 © Pedro Peláez
 

symfony-bundle simplecms-bundle

Symfony Simple CMS Bundle

image

ibrows/simplecms-bundle

Symfony Simple CMS Bundle

  • Tuesday, July 17, 2018
  • by ibrows
  • Repository
  • 20 Watchers
  • 38 Stars
  • 10,296 Installations
  • PHP
  • 0 Dependents
  • 1 Suggesters
  • 11 Forks
  • 0 Open issues
  • 30 Versions
  • 1 % Grown

The README.md

IbrowsSimpleCMSBundle - Simple CMS for anyone anywhere

Setup the bundle

  1. Fetch the source code
  2. Add the namespace to your autoloader
  3. Add the bundle to your AppKernel class
  4. Add routing
  5. Generate Schema
  6. Permissions
  7. Enjoy

How to use simple CMS

Just add a tag to your twig file to allow user to edit a specific entity type (by default, text & image is provided), (*1)

Some Examples, (*2)

``` twig {# add a text with key 'mycustomtextidentifier' #} {{ 'mycustomtextidentifier'|scms('text') }}, (*3)

{# add a image with key 'mycustomimageidentifier' #} {{ scms('mycustomimageidentifier','image') }}, (*4)

{# add a collections of texts with key 'mycustomtextidentifier' #} {{ 'mycustomtextidentifier'|scms_collection('text') }}, (*5)

{# add a collections of images with key 'mycustomimageidentifier' #} {{ scms_collection('mycustomimageidentifier','image') }}, (*6)





Advanced examples ----------------- Single image with `my` class and inline editorstyle (instead of block) and a specific locale (default is the current locale) ``` twig {{ scms('mycustomidentifier','image',{'inline':true,'attr':{'class':'mycssclass'} },'de_CH' ) }}

Flexible amount of wysiwyg text elements, (*7)

twig {{ scms_collection('mycustomidentifier','text',{'html':true}) }}, (*8)

Install & setup the bundle

  1. Fetch the source code, (*9)

    Add IbrowsSimpleCMSBundle in your composer.json:, (*10)

    {
        "require": {
            "ibrows/simplecms-bundle": "*"
        }
    }
    

    Now tell composer to download the bundle by running the command:, (*11)

    bash $ php composer.phar update ibrows/simplecms-bundle, (*12)

    Composer will install the bundle to your project's ibrows/simplecms-bundle directory., (*13)

  2. Add the bundle to your AppKernel class, (*14)

    ``` php, (*15)

    // app/AppKernerl.php public function registerBundles() { $bundles = array( // ... new Ibrows\SimpleCMSBundle\IbrowsSimpleCMSBundle(), // ... ); // ... }, (*16)

    ```, (*17)

  3. Add routing, (*18)

    ``` yaml, (*19)

    // app/config/routing.yml, (*20)

    IbrowsSimpleCMSBundle: resource: "@IbrowsSimpleCMSBundle/Controller/" type: annotation prefix: /scms, (*21)

    use the alias routing

    IbrowsSimpleCMSBundleAlias: resource: . type: ibrows_router prefix: /, (*22)

    ```, (*23)

  4. Generate Schema, (*24)

    ``` bash php app/console doctrine:schema:update --force, (*25)

    ```, (*26)

  5. Permissions, (*27)

    Get permissions for FileUpload, default folder is web-dir uploads/documents, (*28)

Minimal configuration

This bundle requires Nothing !, (*29)

Additional configuration

Edit default config

# app/config/conf.yml

    ibrows_simple_cms:
      include_js_libs: true
      upload_dir: 'uploads/documents'
      role: ROLE_IS_AUTHENTICATED_ANONYMOUSLY

Add security per type

# app/config/conf.yml

    ibrows_simple_cms:
      types:
    # defaults
        text: { class: Ibrows\SimpleCMSBundle\Entity\TextContent , type: Ibrows\SimpleCMSBundle\Form\TextContentType, security:{general: ROLE_ADMIN} }
        image: { class: Ibrows\SimpleCMSBundle\Entity\ImageContent, type: Ibrows\SimpleCMSBundle\Form\FileContentType, security:{general: ROLE_ADMIN, show: ROLE_SUPER_ADMIN, create: ROLE_SUPER_ADMIN , edit: ROLE_SUPER_ADMIN , delete: ROLE_SUPER_ADMIN  } }

Edit TinyMCE Options

# app/config/conf.yml

    ibrows_simple_cms:
      wysiwyg:
        theme: 'advanced'
        theme_advanced_buttons1: 'bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect'
    # other configs...

Add types

Add / Edit types of Content:, (*30)

# app/config/conf.yml

    ibrows_simple_cms:
      types:
        # defaults
        text: { class: Ibrows\SimpleCMSBundle\Entity\TextContent , type: Ibrows\SimpleCMSBundle\Form\TextContentType }
        image: { class: Ibrows\SimpleCMSBundle\Entity\ImageContent, type: Ibrows\SimpleCMSBundle\Form\FileContentType}
        # custom
        mytext: { class: Ibrows\SimpleCMSBundle\Entity\TextContent , type: Ibrows\SimpleCMSBundle\Form\TextContentType , repository: Ibrows\SimpleCMSBundle\Repository\TextContent, label:first}
        mycustomentity: { class: Ibrows\XXXBundle\Entity\YYYContent , type: Ibrows\SimpleCMSBundle\Form\YYYContentType , repository: Ibrows\SimpleCMSBundle\Repository\Content, label:myone}

Your YYYContent Entity have to implement Ibrows\SimpleCMSBundle\Entity\ContentInterface or extend Ibrows\SimpleCMSBundle\Entity\Content or a Child of it. It's also a good idea to extend Ibrows\SimpleCMSBundle\ContentType in your FormType., (*31)

Screenshots

SimpleCMS1, (*32)

SimpleCMS2, (*33)

SimpleCMS3, (*34)

TODO

  • create the ODM version

AUTHORS

Developed at iBROWS GmbH Zurich: Marc Steiner Dominik Zogg Olivier Kofler, (*35)

Twitter: @iBRWOSWEB Web: www.ibrows.ch, (*36)

The Versions

17/07 2018

dev-5.2.2-Symfony3.4

dev-5.2.2-Symfony3.4 http://www.ibrows.ch

Symfony Simple CMS Bundle

  Sources   Download

MIT

The Requires

 

symfony cms simple symfony cms symfony simple cms

03/07 2018

dev-dev-5.2.2-Symfony3.4

dev-dev-5.2.2-Symfony3.4 http://www.ibrows.ch

Symfony Simple CMS Bundle

  Sources   Download

MIT

The Requires

 

symfony cms simple symfony cms symfony simple cms

07/10 2015

dev-sf2.2

dev-sf2.2 http://www.ibrows.ch

Symfony Simple CMS Bundle

  Sources   Download

MIT

The Requires

 

symfony cms simple symfony cms symfony simple cms

07/10 2015

5.2.2

5.2.2.0 http://www.ibrows.ch

Symfony Simple CMS Bundle

  Sources   Download

MIT

The Requires

 

symfony cms simple symfony cms symfony simple cms

23/12 2014

5.2.1

5.2.1.0 http://www.ibrows.ch

Symfony Simple CMS Bundle

  Sources   Download

MIT

The Requires

 

symfony cms simple symfony cms symfony simple cms

09/12 2014

5.2.0

5.2.0.0 http://www.ibrows.ch

Symfony Simple CMS Bundle

  Sources   Download

MIT

The Requires

 

symfony cms simple symfony cms symfony simple cms

09/12 2014

5.1.1

5.1.1.0 http://www.ibrows.ch

Symfony Simple CMS Bundle

  Sources   Download

MIT

The Requires

 

cms

04/12 2014

5.1.0

5.1.0.0 http://www.ibrows.ch

Symfony Simple CMS Bundle

  Sources   Download

MIT

The Requires

 

cms

02/12 2014

5.0.1

5.0.1.0 http://www.ibrows.ch

Symfony Simple CMS Bundle

  Sources   Download

MIT

The Requires

 

cms

02/12 2014

5.0.0

5.0.0.0 http://www.ibrows.ch

Symfony Simple CMS Bundle

  Sources   Download

MIT

The Requires

 

cms

23/09 2014

4.2.10

4.2.10.0 http://www.ibrows.ch

Symfony Simple CMS Bundle

  Sources   Download

MIT

The Requires

 

cms

22/09 2014

4.2.9

4.2.9.0 http://www.ibrows.ch

Symfony Simple CMS Bundle

  Sources   Download

MIT

The Requires

 

cms

08/09 2014

4.2.8

4.2.8.0 http://www.ibrows.ch

Symfony Simple CMS Bundle

  Sources   Download

MIT

The Requires

 

cms

04/09 2014

4.2.7

4.2.7.0 http://www.ibrows.ch

Symfony Simple CMS Bundle

  Sources   Download

MIT

The Requires

 

cms

15/08 2014

4.2.6

4.2.6.0 http://www.ibrows.ch

Symfony Simple CMS Bundle

  Sources   Download

MIT

The Requires

 

cms

15/08 2014

4.2.5

4.2.5.0 http://www.ibrows.ch

Symfony Simple CMS Bundle

  Sources   Download

MIT

The Requires

 

cms

18/07 2014

4.2.4

4.2.4.0 http://www.ibrows.ch

Symfony Simple CMS Bundle

  Sources   Download

MIT

The Requires

 

cms

18/07 2014

4.1.4

4.1.4.0 http://www.ibrows.ch

Symfony Simple CMS Bundle

  Sources   Download

MIT

The Requires

 

cms

24/06 2014

4.2.2

4.2.2.0 http://www.ibrows.ch

Symfony Simple CMS Bundle

  Sources   Download

MIT

The Requires

 

cms

20/06 2014

4.2.1

4.2.1.0 http://www.ibrows.ch

Symfony Simple CMS Bundle

  Sources   Download

MIT

The Requires

 

cms

20/06 2014

4.2.0

4.2.0.0 http://www.ibrows.ch

Symfony Simple CMS Bundle

  Sources   Download

MIT

The Requires

 

cms

28/05 2014

4.1.3

4.1.3.0 http://www.ibrows.ch

Symfony Simple CMS Bundle

  Sources   Download

MIT

The Requires

 

cms

30/04 2014

4.1.2

4.1.2.0 http://www.ibrows.ch

Symfony Simple CMS Bundle

  Sources   Download

MIT

The Requires

 

cms

31/01 2014

4.1.1

4.1.1.0 http://www.ibrows.ch

Symfony Simple CMS Bundle

  Sources   Download

MIT

The Requires

 

cms

31/01 2014

4.1.0

4.1.0.0 http://www.ibrows.ch

Symfony Simple CMS Bundle

  Sources   Download

MIT

The Requires

 

cms

12/09 2013

4.0.0

4.0.0.0 http://www.ibrows.ch

Symfony Simple CMS Bundle

  Sources   Download

MIT

The Requires

 

cms

12/08 2013

3.0.0

3.0.0.0 http://www.ibrows.ch

Symfony Simple CMS Bundle

  Sources   Download

MIT

The Requires

 

cms

05/03 2013

2.2.0

2.2.0.0 http://www.ibrows.ch

Symfony Simple CMS Bundle

  Sources   Download

MIT

The Requires

 

cms