Find the Exponential Software extensions you want
| UNIX name | Owner | Status |
|---|---|---|
| site-link-bundle | Contextual Code | stable |
| Version | Compatible with |
|---|---|
| N/A | N/A |
This is an eZ Platform / eZ Publish 5 Symfony bundle to fix cross-siteaccess links, linking media types, etc.
Run composer require:
$ composer require contextualcode/site-link-bundle
Enable the bundle in app/AppKernel.php (ezpublish/EzPublishKernel.php) by adding this line in the registerBundles method:
public function registerBundles()
{
$bundles = array(
...
new ContextualCode\SiteLinkBundle\ContextualCodeSiteLinkBundle(),
...
);
Usage is automatic once the bundle is enabled and configured.
You can use site-link-cross-siteaccess parameter to disable cross siteaccess linking.
For example:
{{ path( 'ez_urlalias', { 'locationId': 2, 'site-link-cross-siteaccess': false }) }}
$router->generate('ez_urlalias', ['locationId' => 2, 'site-link-cross-siteaccess' => false]);
The bundle contains a few options that can be configured in config.yml. For example:
contextual_code_site_link:
siteaccess_host_match_method: "first"
internal_external:
- class_identifier: link
external_attribute_identifier: external_link
internal_attribute_identifier: internal_link
- class_identifier: banner
external_attribute_identifier: external_link
internal_attribute_identifier: internal_link
direct_file_link:
- class_identifier: file
attribute_identifier: file
direct_image_link:
- class_identifier: image
attribute_identifier: image