Developed with love by KnpLabs Hire us for your project!
49

sylius-article-bundle

by webburza

Article bundle (blog, news...) for the Sylius e-commerce platform.

Sylius Article Bundle

This bundle extends the Sylius e-commerce platform with Article resource, which can be used to
publish news, articles, or as a blog. It comes with full multilingual support, the ability to
group articles into categories, and the ability to set related products for articles.




Installation

  1. require the bundle with Composer:

    $ composer require webburza/sylius-article-bundle
    
  2. enable the bundle in app/AppKernel.php:

    public function registerBundles()
    {
    $bundles = array(
      // ...
      new \Webburza\Sylius\ArticleBundle\WebburzaSyliusArticleBundle(),
      // ...
    );
    }
    
  3. add configuration to the top of app/config/config.yml:

    imports:
      - { resource: "@WebburzaSyliusArticleBundle/Resources/config/config.yml" }
    
  4. register routes in app/config/routing.yml

    webburza_article:
      resource: "@WebburzaSyliusArticleBundle/Resources/config/routing.yml"
    
    webburza_article_front:
      resource: "@WebburzaSyliusArticleBundle/Resources/config/routingFront.yml"
      prefix:  /articles
    

    As you can see, there are two groups of routes, the main resource (administration) routes,
    and the front-end routes. If you're using the bundle for a blog, or news, you can
    set the prefix for the routes here, changing it to /blog, or /news.

  5. The bundle should now be fully integrated, but it still requires
    database tables to be created. For this, we recommend using migrations.

    $ bin/console doctrine:migrations:diff
    $ bin/console doctrine:migrations:migrate
    

    Or if you don't use migrations, you can update the database schema directly.

    $ bin/console doctrine:schema:update
    

Configuration

Translations and naming (blog, news, articles...)

The bundle has multilingual support, and language files can be
overridden as with any other bundle, by creating translation files in the
app/Resources/WebburzaSyliusArticleBundle/translations directory.

This also allows for different naming, so if you're using the bundle as a blog,
or as a source of latest news, you can replace all mentions of articles with
that of blog, news, or something else completely.

To get started, check the bundle's main language file in:
Resources/translations/messages.en.yml

File repository integration in rich-text editors

The bundle uses rich-text editors (CKEditor) to work
with content, which allows the user to work with images in the content as well.

By default, this is limited to specifying the URL to the image manually, but
if your application integrates a file repository system for editors, such as
CKFinder, or the free alternative
KCFinder, you can easily add the functionality
to allow the users to upload and work with image files directly trough the
rich-text editor.

To accomplish this, simply fill in the bundle's configuration with your file browser
URI's, as seen in the example bellow:

# ...

webburza_sylius_article:
    file_browser:
        browse_url: "/browser/browse.php"
        upload_url: "/uploader/upload.php"

This will add file upload and browse controls to your rich-text editors.
For more information, see http://docs.ckeditor.com/#!/guide/dev_file_browse_upload

License

This bundle is available under the MIT license.

To-do

  • Automated tests
The MIT License (MIT)

Copyright (c) 2016 web.burza

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
webburza_sylius_article:
file_browser:
browse_url: ~
upload_url: ~
  • Merge pull request #24 from Everus/master
    By web-flow, 3 years ago
  • Added russian translation.
    By Everus, 3 years ago
  • Merge pull request #23 from webburza/develop
    By web-flow, 3 years ago
  • Add code field for Article Category
    By ychanan, 3 years ago
  • Merge pull request #22 from webburza/develop
    By web-flow, 3 years ago
  • Set default featured and published values to false instead of null
    By ychanan, 3 years ago
  • Merge pull request #21 from webburza/develop
    By web-flow, 3 years ago
  • Add missing configuration parameter
    By ychanan, 3 years ago
  • Merge pull request #20 from webburza/develop
    By web-flow, 3 years ago
  • Update readme, change cover image size
    By ychanan, 3 years ago
  • Upgrade the project for Sylius 1.0@beta
    By ychanan, 3 years ago
  • Merge pull request #18 from webburza/feature/upgrade
    By web-flow, 4 years ago
  • feature(upgrade): Bump to Sylius 0.19
    By ychanan, 4 years ago
  • Merge pull request #16 from webburza/fix/compatibility
    By web-flow, 4 years ago
  • fix(article-form): Fix form element type for content
    By ychanan, 4 years ago
  • feature(compatibility): Update for increased compatibility
    By ychanan, 4 years ago
  • feature(readme): Update readme
    By ychanan, 4 years ago
  • feature(related-products): Add ability to link products to articles
    By ychanan, 4 years ago
  • Merge pull request #14 from webburza/feature/sylius-0-18
    By ychanan, 4 years ago
  • feature(upgrade): Bump for Sylius 0.18
    By ychanan, 4 years ago
  • Merge pull request #12 from webburza/development
    By ychanan, 4 years ago
  • fix(readme): Fix typo
    By ychanan, 4 years ago
  • Merge pull request #11 from antonioperic/small-fix
    By ychanan, 4 years ago
  • removed remaining autogenerated entity
    By antonioperic, 4 years ago
  • Merge pull request #10 from webburza/development
    By ychanan, 4 years ago
  • fix(composer): Update tags
    By ychanan, 4 years ago
  • Merge pull request #9 from webburza/development
    By ychanan, 4 years ago
  • fix(readme): Fix translations link in readme
    By ychanan, 4 years ago
  • Merge pull request #8 from webburza/development
    By ychanan, 4 years ago
  • fix(listing): Import missing macro for alerts
    By ychanan, 4 years ago