Coder Social home page Coder Social logo

syliushomepageplugin's Introduction

Monsieur Biz logo      Sylius logo
Monsieur Biz is a Sylius Extension Artisan partner

Homepages

Homepage Plugin license Build Status

This plugins allows you to manage your homepages using the Rich Editor.

If you want to know more about our editor, see the Rich Editor Repository

Example of homepage edition

Installation

composer require monsieurbiz/sylius-homepage-plugin

Change your config/bundles.php file to add the line for the plugin :

<?php

return [
    //..
    MonsieurBiz\SyliusHomepagePlugin\MonsieurBizSyliusHomepagePlugin::class => ['all' => true],
];

Then create the config file in config/packages/monsieurbiz_sylius_homepage_plugin.yaml :

imports:
    - { resource: "@MonsieurBizSyliusHomepagePlugin/Resources/config/config.yaml" }

Finally import the routes in config/routes/monsieurbiz_sylius_homepage_plugin.yaml :

monsieurbiz_sylius_homepage_admin:
    resource: "@MonsieurBizSyliusHomepagePlugin/Resources/config/routes/admin.yaml"
    prefix: /%sylius_admin.path_name%

monsieurbiz_sylius_homepage_homepage:
    path: /{_locale}/
    methods: [GET]
    requirements:
        _locale: ^[a-z]{2}(?:_[A-Z]{2})?$
    defaults:
        _controller: monsieurbiz_homepage.controller.homepage:indexAction
        _sylius:
            template: '@MonsieurBizSyliusHomepagePlugin/Homepage/index.html.twig'
            repository:
                method: findOneByChannelAndLocale
                arguments:
                    - "expr:service('sylius.context.channel').getChannel()"
                    - "expr:service('sylius.context.locale').getLocaleCode()"

Migrations

Make a doctrine migration diff :

bin/console doctrine:migrations:diff

Then run it :

bin/console doctrine:migrations:migrate

Example of complete homepage

Admin form with preview

Admin full form

Front display

Front full display

Create custom elements

You can customize and create custom elements in your page.
In order to do that, you can check the Rich Editor custom element creation

SEO Friendly

You can define for your homepage the meta title, meta description and meta keywords.

Contributing

You can open an issue or a Pull Request if you want! 😘
Thank you!

syliushomepageplugin's People

Contributors

dieterholvoet avatar jacquesbh avatar maximehuran avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.