phlexible / sitemap-bundle
phlexible 网站地图组件
1.3.1
2017-01-27 13:42 UTC
Requires
- php: >=5.6.0
- phlexible/siteroot-bundle: ~1.3
- phlexible/tree-bundle: ~1.3
- thepixeldeveloper/sitemap: ^4.4.2
Requires (Dev)
- doctrine/collections: ^1.3
- matthiasnoback/symfony-config-test: ^2.0
- matthiasnoback/symfony-dependency-injection-test: ^1.0
- mikey179/vfsstream: ^1.6
- phlexible/country-context-bundle: ~1.2
- phpunit/phpunit: ^5.6
- symfony/config: ^2.8
- symfony/console: ^2.8
- symfony/dependency-injection: ^2.8
- symfony/http-kernel: ^2.8
README
PhlexibleSitemapBundle 为 phlexible 添加了对搜索字段的支撑。
安装
- 使用 composer 下载 PhlexibleSitemapBundle
- 启用组件
- 导入 PhlexibleSitemapBundle 路由
- 清除 symfony 缓存
步骤 1:使用 composer 下载 PhlexibleSitemapBundle
通过运行以下命令添加 PhlexibleSitemapBundle
$ php composer.phar require phlexible/sitemap-bundle "~1.0.0"
Composer 会将组件安装到项目的 vendor/phlexible
目录下。
步骤 2:启用组件
在 kernel 中启用组件
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Phlexible\Bundle\SitemapBundle\PhlexibleSitemapBundle(), ); }
步骤 3:导入 PhlexibleSitemapBundle 路由
导入 PhlexibleSitemapBundle 路由。
对于前端
# app/config/routing.yml phlexible_sitemap: resource: "@PhlexibleSitemapBundle/Controller/SitemapController.php" type: annotation
步骤 4:清除 symfony 缓存
如果你使用 prod 环境访问 phlexible 应用程序,请清除缓存
$ php app/console cache:clear --env=prod