thelia/alternate-hreflang-module
最新稳定版本:2.0.2
Composer 安装命令:
composer require thelia/alternate-hreflang-module
包简介
README 文档
README
This module generates a alternateHreflang URL for every page of your shop. Once activated, you'll find a <link rel="alternate" hreflang=".." href="..." /> tag in the header of your pages.
Installation
Manually
- Copy the module into
<thelia_root>/local/modules/directory and be sure that the name of the module is AlternateHreflang. - Activate it in your thelia administration panel
Composer
Add it in your main thelia composer.json file
composer require thelia/alternate-hreflang-module:~1.1.0
Usage
You just have to activate the module and check the meta tags of your shop.
Generation example
If your current lang is en and your default lang is fr
<link rel="alternate" hreflang="en" href=".... en url" /> <link rel="alternate" hreflang="fr" href=".... fr url" /> <link rel="alternate" hreflang="es" href=".... es url" /> <link rel="alternate" hreflang="it" href=".... it url" /> <link rel="alternate" hreflang="x-default" href=".... fr url" />
If your current lang is fr and your default lang is it
<link rel="alternate" hreflang="fr" href=".... fr url" /> <link rel="alternate" hreflang="en" href=".... en url" /> <link rel="alternate" hreflang="es" href=".... es url" /> <link rel="alternate" hreflang="it" href=".... it url" /> <link rel="alternate" hreflang="x-default" href=".... it url" />
This module generate hreflang only for languages enabled in the backoffice
If you want the locale hreflang="...." on 5 characters, you have to pass the configuration variable hreflangFormat to 1
If your current lang is fr and your default lang is it
<link rel="alternate" hreflang="fr-fr" href=".... fr url" /> <link rel="alternate" hreflang="en-us" href=".... en url" /> <link rel="alternate" hreflang="es-es" href=".... es url" /> <link rel="alternate" hreflang="it-it" href=".... it url" /> <link rel="alternate" hreflang="x-default" href=".... it url" />
Hook
This module uses the hook main.head-bottom
统计信息
- 总下载量: 2.55k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2018-11-19