mage-os / module-hreflang
Locale identification management for urls
Package info
github.com/mage-os-lab/module-hreflang
Language:XSLT
Type:magento2-module
pkg:composer/mage-os/module-hreflang
Requires
- php: ^8.1
README
🚀 Features
This module adds locale identification management for urls
- cms pages
- product pages
- category pages
🔧 Installation
You can install this module adding it on app/code folder or with composer.
composer require mage-os/module-hreflang
Then you'll need to enable the module and update your database and files:
php bin/magento module:enable MageOS_Hreflang
php bin/magento setup:upgrade
php bin/magento setup:di:compile
CONFIGURATION
You must enable the module from "Stores > Configurations > Web > Search Engine Optimization" section adding your hreflang configuration for store view scope. CMS pages are related to each other via the meta_identifier attribute (if filled in). See the "Search Engine Optimization > Hreflang association identifier" section for each page.
EXTENSION
You can add multiple controllers/url retrievers configurations mapping other scenarios trough Dependency injection. Create a new module with MageOS_Hreflang inside module.xml sequence, then add new retrievers through di.xml:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="MageOS\Hreflang\Model\Retriever\HreflangService">
<arguments>
<argument name="retrievers" xsi:type="array">
<item name="other_controller_path" xsi:type="object">Vendor\Module\Model\Retriever\OtherScenarioHreflangRetriever</item>
</argument>
</arguments>
</type>
</config>
🤝 Changelog
Please see CHANGELOG for more information on what has changed recently.
📄 License
The MIT License (MIT). Please see License File for more information.