Upgrading from 1.3.0 to 1.4.0¶
Upgrade composer.json
¶
In your composer.json
file, upgrade the version of netgen/layouts-core
package and all other related packages (like netgen/layouts-standard
,
netgen/layouts-ibexa
and others) to ~1.4.0
and run the
composer update
command.
Upgrading Netgen Content Browser¶
Netgen Content Browser version 1.4 was also automatically installed. Be sure to read its upgrade instructions too.
Upgrading your templates¶
1.4 version of Netgen Layouts added 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, some of your Twig templates need to be updated.
Updating your pagelayout¶
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>
Changelog¶
Major features¶
- Added block manipulation features to layout preview (available only in Enterprise version)
- Added support for components in Ibexa CMS integration. Components are special blocks that act as a 1:1 proxy to an Ibexa content. Components use view types defined in attached content as opposed to statically defined list of view types in Netgen Layouts config.
Other changes¶
- Added full support for PHP 8.1
- Added PHP 8.x attributes for simplified registering of Symfony services for various extension points
- Dropped support for PHP 8.0
Deprecations¶
- Base template for all admin block templates
@NetgenLayoutsAdmin/app/block/block.html.twig
is deprecated and will be removed in 2.0. Use@nglayouts_admin/app/block/block.html.twig
instead. ValueUrlGeneratorInterface::generate
method is deprecated and is replaced by two new methods in newly added interfaceExtendedValueUrlGeneratorInterface
:generateDefaultUrl
andgenerateAdminUrl
. These two methods generate item paths for frontend and backend, respectively. Implement the new interface in your value URL generators and call thegenerateDefaultUrl
in yourgenerate
method to migrate. Note that theExtendedValueUrlGeneratorInterface
interface is immediately deprecated and will be merged intoValueUrlGeneratorInterface
interface and removed in 2.0.- While not strictly a deprecation but related to the point above,
nglayouts_item_path
Twig function now receives a second argument with two possible values:default
(this value being the default one) andadmin
in order to specify which URL you wish to generate. Update your calls tonglayouts_item_path
Twig function as needed to make sure the correct URL is generated for your items.
Breaking changes¶
There were no breaking changes in 1.4 version of Netgen Layouts.