mubat / yii2-sitemap-generator
Yii2 widget for sitemap generation
Installs: 220
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- php: >=5.4
- yiisoft/yii2: ^2.0.0
This package is not auto-updated.
Last update: 2024-11-10 04:17:21 UTC
README
Simple widget for Yii2 framework to generate sitemap.
Support XML format generation.
Support multi language.
Installation
Composer
The preferred way to install this extension is through Composer.
Either run php composer require mubat/yii2-sitemap-generator
or add "mubat/yii2-sitemap-generator" : "~1.0"
to the require section of your composer.json
Widget contains 2 models:
- Sitemap - base model. It contains SitemapElement array and methods to generate XML.
If
$languages
array published, model will generate 'alternate' links. - SitemapElement - represents one
<url>
element. It contains:$loc
- requrired - page url (as array). Before insert into XML it will be process byyii2\helpers\Url::toRoute()
method.$updated_at
- optional - last page update;$changefreq
- requrired, default'weekly'
- from class constant.$priority
- requrired, default0.4
- page priority.