Install Netgen Layouts Enterprise (without Symfony Flex)¶
To install Netgen Layouts Enterprise, you need to have an existing Symfony full stack installation (Ibexa CMS, Sylius, clean Symfony install…) with Netgen Layouts open source edition installed and configured.
Add packages to Composer¶
To install Netgen Layouts Enterprise, you need a valid license. Once purchased, you need to add the license to Composer with the following command:
composer config http-basic.packagist.netgen.biz <username> <token>
Next, add the packagist.netgen.biz
Composer repository to repositories
section of your composer.json
:
"repositories": [
{ "type": "composer", "url": "https://packagist.netgen.biz", "canonical": false }
]
Add the netgen/layouts-enterprise
package to your require
section. Use
the same version as the Netgen Layouts packages from open source edition. For
example, if you’re using ~1.0.0
version of Netgen Layouts, use the same
~1.0.0
version for Netgen Layouts Enterprise too.
Note
If you’re installing Netgen Layouts Enterprise on Ibexa CMS, you need
the netgen/layouts-enterprise-ibexa
package too, in the same
version as the other Netgen Layouts packages.
Activate the bundles¶
Add the following bundles to your configuration:
Netgen\Bundle\LayoutsEnterpriseBundle\NetgenLayoutsEnterpriseBundle::class => ['all' => true],
Netgen\Bundle\LayoutsEnterpriseAdminBundle\NetgenLayoutsEnterpriseAdminBundle::class => ['all' => true],
Netgen\Bundle\LayoutsEnterpriseUIBundle\NetgenLayoutsEnterpriseUIBundle::class => ['all' => true],
Note
If you’re installing Netgen Layouts on Ibexa CMS, activate the following bundle too after all of the bundles listed above:
Netgen\Bundle\LayoutsEnterpriseIbexaBundle\NetgenLayoutsEnterpriseIbexaBundle::class => ['all' => true],
Make sure to activate these bundles after all other Netgen Layouts bundles.
Run Composer¶
Note
Make sure you run Composer only after adding the bundles to your configuration. Otherwise, important frontend assets will not be installed. In that case, you can install the assets later by running the following command:
php bin/console assets:install --symlink --relative
Run the following Composer command to install the packages:
composer update --prefer-dist
Warning
prefer-dist
is used because it is not possible to install source
packages from packagist.netgen.biz
repository. Make sure to remember
this when upgrading Netgen Layouts Enterprise to future versions.
Routing and assets¶
Add the following routes to your main routing config file. Make sure you add them after all other Netgen Layouts routes:
netgen_layouts_enterprise:
resource: "@NetgenLayoutsEnterpriseBundle/Resources/config/routing.yaml"
prefix: "%netgen_layouts.route_prefix%"
Note
If you’re installing Netgen Layouts on Ibexa CMS, activate the following routes too after the routes listed above:
netgen_layouts_enterprise_ibexa:
resource: "@NetgenLayoutsEnterpriseIbexaBundle/Resources/config/routing.yaml"
Update your template¶
Netgen Layouts Enterprise adds an advanced layout preview. With it, you can add (removing is not yet possible) and manipulate blocks directly from the preview interface.
To support this, your main page layout needs to be updated.
Somewhere in your main page layout, you will need to add the following to your
head
element:
<head>
...
{{ nglayouts_template_plugin('preview.javascripts') }}
...
</head>
Before the end of your body
element, add the following:
...
{{ nglayouts_template_plugin('preview.body') }}
</body>