The preferred method of installation is via Packagist and Composer. Run the following command to install the package and add it as a requirement to your project's composer.json:
composer req revision-ten/cms-elementsEnable the bundle by adding it to your bundles.php:
RevisionTen\CmsElements\CmsElementsBundle::class => ['all' => true],
Cocur\Slugify\Bridge\Symfony\CocurSlugifyBundle::class => ['all' => true],Add the desired elements to your CMS config by importing their configurations.
Example: cms.yaml
imports:
- { resource: ../../vendor/revision-ten/cms-elements/Resources/config/vehicle/vehicle_offer.yaml }
- { resource: ../../vendor/revision-ten/cms-elements/Resources/config/better_default/all.yaml }Import the typescript files if needed:
import '../../vendor/revision-ten/cms-elements/Typescript/BetterDefault/all';Import stylesheets files:
@import '../../vendor/revision-ten/cms-elements/SCSS/BetterDefault/all';Add additional admin form themes to your projects twig.yaml:
twig:
form_themes:
- 'CmsElementsBundle:Vehicle:form_theme.html.twig'- VehicleOffer
- VehicleFinancing
- VehicleEnVKV
- VehicleDatDisclaimer
- Image (requires Lozad.js)
- Images (requires Lozad.js and baguetteBox.js)
- Form