PHPackages                             sherlockode/sylius-advanced-content-plugin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. sherlockode/sylius-advanced-content-plugin

ActiveSylius-plugin

sherlockode/sylius-advanced-content-plugin
==========================================

Sylius plugin for SherlockodeAdvancedContentBundle

v0.4.0(1y ago)11.7k↓50%1[1 PRs](https://github.com/sherlockode/SyliusAdvancedContentPlugin/pulls)MITPHPPHP ^7.4 || ^8.1

Since Feb 2Pushed 1y ago4 watchersCompare

[ Source](https://github.com/sherlockode/SyliusAdvancedContentPlugin)[ Packagist](https://packagist.org/packages/sherlockode/sylius-advanced-content-plugin)[ RSS](/packages/sherlockode-sylius-advanced-content-plugin/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (2)Versions (12)Used By (0)

Sylius AdvancedContent plugin
=============================

[](#sylius-advancedcontent-plugin)

---

[ ![](https://camo.githubusercontent.com/5e6479b1aa7a82fdc27b9e6298f8d7b42550265c5db33e597fb5cfd872bb53b3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f736865726c6f636b6f64652f73796c6975732d616476616e6365642d636f6e74656e742d706c7567696e)](https://packagist.org/packages/sherlockode/sylius-advanced-content-plugin "License")[ ![](https://camo.githubusercontent.com/babf7a97b523bfc6a3a1ccded1327a46b44a46261b76d486beec5f15d9e8644a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736865726c6f636b6f64652f73796c6975732d616476616e6365642d636f6e74656e742d706c7567696e)](https://packagist.org/packages/sherlockode/sylius-advanced-content-plugin "Version")[ ![](https://camo.githubusercontent.com/d204329ceb091f30af0f1ae64091feb4512007994b8490394ce38cd5f7903114/68747470733a2f2f706f7365722e707567782e6f72672f736865726c6f636b6f64652f73796c6975732d616476616e6365642d636f6e74656e742d706c7567696e2f646f776e6c6f616473)](https://packagist.org/packages/sherlockode/sylius-advanced-content-plugin "Total Downloads")[ ![Support](https://camo.githubusercontent.com/e2e1becf96ac10cfcfae03397fd7c605cca341564088ccd453d91e1d2024a14b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f737570706f72742d636f6e74616374253230617574686f722d626c7565253544)](https://www.sherlockode.fr/contactez-nous/?utm_source=github&utm_medium=referral&utm_campaign=plugins_sylius_acb)

[![image](https://user-images.githubusercontent.com/22291441/230099691-0fad8407-9883-4f0c-bdbd-9d6a8245a8db.png)](https://user-images.githubusercontent.com/22291441/230099691-0fad8407-9883-4f0c-bdbd-9d6a8245a8db.png)

Table of Content
----------------

[](#table-of-content)

---

- [Overview](#overview)
- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)
- [Demo](#demo-sylius-shop)
- [Additional resources for developers](#additional-resources-for-developers)
- [License](#license)
- [Contact](#contact)

Overview
========

[](#overview)

---

This plugin enables Sherlockode's AdvancedContentBundle on your Sylius website.

It provides advanced CMS features for end user contribution. Users can build their website pages quickly and effortlessly thanks to our intuitive interface. Several standard elements are included, such as text block, heading, image, image carousel, video player, ... Responsive layouts can be shaped as needed with row and column elements. Drafts are saved automatically and it's easy to rollback to a previous version. Custom elements can be added simply with a few lines of code.

Installation
============

[](#installation)

---

Install the plugin with composer:

```
$ composer require sherlockode/sylius-advanced-content-plugin
```

Configuration
=============

[](#configuration)

---

Import the routing configuration and Sylius configuration from the bundle

```
# config/sylius_acb.yaml
imports:
    - { resource: "@SherlockodeSyliusAdvancedContentPlugin/Resources/config/config.yaml" }
```

```
# config/routes/sylius_acb.yaml
sherlockode_advanced_content_bundle:
    resource: "@SherlockodeAdvancedContentBundle/Resources/config/routing/base.xml"
    prefix: '/%sylius_admin.path_name%/acb'

sherlockode_advanced_content:
    resource: "@SherlockodeSyliusAdvancedContentPlugin/Resources/config/admin_routing.yaml"
    prefix: '/%sylius_admin.path_name%/acb'
```

Regarding the assets, the same setup as for the standalone AdvancedContentBundle should be done.

Update your `package.json` with the following:

```
{
  "dependencies": {
    "@fortawesome/fontawesome-free": "^6.1.2",
    "jquery": "^3.5.0",
    "jquery-ui": "1.12.1"
  }
}
```

In the admin JS entry file from your assets, add the resources from the bundle:

```
// ./assets/admin/entry.js
//...
import '../../vendor/sherlockode/advanced-content-bundle/Resources/public/css/index.scss';
import '../../vendor/sherlockode/advanced-content-bundle/Resources/js/index.js';
import '../../vendor/sherlockode/sylius-advanced-content-plugin/src/Resources/public/css/index.scss';

import '@fortawesome/fontawesome-free/css/fontawesome.css';
import '@fortawesome/fontawesome-free/css/solid.css';
```

If you are using Webpack, you can add the following lines to your admin configuration:

```
// ./webpack.config.js
//...
Encore.addLoader({
    resolve: {
        alias: {
            './acb-notification.js$': path.resolve(__dirname, 'vendor/sherlockode/sylius-advanced-content-plugin/src/Resources/js/AdvancedContentBundle/acb-notification.js')
        }
    }
});
```

Usage
=====

[](#usage)

---

The plugin adds a new Content section in the admin menu.
It includes links to the Page grid, to the Content grid and to the Tools page.

You can checkout our documentation on the [Advanced Content Bundle](https://github.com/sherlockode/advanced-content-bundle) to learn more on how to use the plugin:

- [Terminology](https://github.com/sherlockode/advanced-content-bundle#terminology)
- [Upload Configuration](https://github.com/sherlockode/advanced-content-bundle#upload-configuration)
- [Advanced Documentation](https://github.com/sherlockode/advanced-content-bundle#advanced-documentation)

Customizing page preview
------------------------

[](#customizing-page-preview)

By default, the layout used to show the page previews is located at `@SherlockodeSyliusAdvancedContentPlugin/Preview/preview.html.twig`. You can customize this template by overriding it like [any template in a third party bundle](https://symfony.com/doc/current/bundles/override.html#templates), or by replacing the `sherlockode_sylius_acb.preview.view_handler` service to manage different layouts depending on the page type:

```
services:
    sherlockode_sylius_acb.preview.view_handler:
        class: App\Acb\ViewHandler
```

And defining the service by yourself:

```
