2017 © Pedro Peláez
 

symfony-bundle cms-bundle

A CMS Bundle for Symfony3

image

devtronic/cms-bundle

A CMS Bundle for Symfony3

  • Saturday, April 1, 2017
  • by Devtronic
  • Repository
  • 1 Watchers
  • 0 Stars
  • 99 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 2 Open issues
  • 6 Versions
  • 1 % Grown

The README.md

CMS Bundle for Symfony2 / Symfony3

Status

Done

  • English Translation
  • German Translation
  • Show menus in Twig-Templates
  • Menu-, MenuItem-, Page-Entity
  • Sonata Admins
  • Make menu templates more dynamic

Open

  • Multi-Language DB Content
  • Stuff... :)

Installation

``` bash $ composer require --dev devtronic/cms-bundle, (*1)


```php <?php use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Config\Loader\LoaderInterface; class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... new Ivory\CKEditorBundle\IvoryCKEditorBundle(), new Devtronic\CmsBundle\CmsBundle(), ); // ... return $bundles; } // ... }

Symfony >= 3.x ``` bash $ php bin/console assets:install --symlink --relative $ php bin/console doctrine:schema:update --force $ php bin/console cache:clear, (*2)

Symfony <= 2.8.x
``` bash
$ php app/console assets:install --symlink --relative
$ php app/console doctrine:schema:update --force
$ php app/console cache:clear

Configuration

# app/config/routing.yml
devtronic_cms_bundle:
    resource: "@CmsBundle/Controller/"
    type:     annotation
    prefix:   /cms # OR WHAT EVER YOU WANT (links goes example.com/cms/{page-slug})    

Usage

Show a menu in twig-template

{# anything.html.twig #}
{{ cms_menu("MENU SLUG GOES HERE") }}

{# or with a custom Menu Template #}
{{ cms_menu("MENU SLUG GOES HERE", "AnyBundle:Path:menu_template.html.twig") }}

Templates

{# app/Resources/CmsBundle/views/menu.html.twig #}
{# Types: 0: CMS Page, 1: Hyperlink, 2: Route #}

{# Top-Level Menu Entries #}
{% if menu.items is defined %}


{# Sub-Entries #} {% elseif menu.subItems is defined %} {% endif %}

Page Template

{# app/Resources/CmsBundle/views/Page/page.html.twig #}

{% extends "::base.html.twig" %}

{% block title %}{{ page.title }}{% endblock %}

{% block body %}


{{ page.title }}

{{ page.content | raw }} {% endblock %}

Index Template

{# app/Resources/CmsBundle/views/Page/index.html.twig #}

{% extends "::base.html.twig" %}

{% block title %}{{ page.title }}{% endblock %}

{% block body %}


{{ page.title }}

{{ page.content | raw }} {% endblock %}

FAQ

As menuentry: Internal route to cms_index As Link in template: <a href="{{ path('cms_index') }}">Home</a>, (*3)

How to contribute?

Translate the Bundle (send messages.LOCALE.xlf and your user-/name to admin@developer-heaven.de, (*4)

Translation status

Language Translator Status
German Devtronic 100%
English Modius22 100%

The Versions

01/04 2017

dev-master

9999999-dev

A CMS Bundle for Symfony3

  Sources   Download

MIT

The Requires

 

by Julian Finkler

01/04 2017

v1.0.5

1.0.5.0

A CMS Bundle for Symfony3

  Sources   Download

MIT

The Requires

 

by Julian Finkler

17/08 2016

1.0.4

1.0.4.0

A CMS Bundle for Symfony2

  Sources   Download

MIT

The Requires

 

by Julian Finkler

24/06 2016

1.0.2

1.0.2.0

A CMS Bundle for Symfony2

  Sources   Download

MIT

The Requires

 

by Julian Finkler

03/05 2016

v1.0.2-alpha

1.0.2.0-alpha

A CMS Bundle for Symfony2

  Sources   Download

MIT

The Requires

 

by Julian Finkler

17/04 2016

v1.0.1-alpha

1.0.1.0-alpha

A CMS Bundle for Symfony2

  Sources   Download

MIT

The Requires

 

by Julian Finkler