remg / layout-bundle
此包最新版本(dev-master)没有提供许可信息。
Symfony3的布局集成
dev-master
2017-02-19 23:01 UTC
Requires
- php: >=5.5.9
- cocur/slugify: ^2.3
- knplabs/knp-menu-bundle: ^2.1
- knplabs/knp-paginator-bundle: ^2.5
- leafo/scssphp: ^0.6.6
- lexik/form-filter-bundle: ^5.0
- liip/imagine-bundle: ^1.6
- patchwork/jsqueeze: ^2.0
- symfony/assetic-bundle: ^2.8
- twig/extensions: ^1.4
Requires (Dev)
- codeclimate/php-test-reporter: dev-master
This package is not auto-updated.
Last update: 2024-09-29 01:38:04 UTC
README
1 在composer.json
的require
键中添加
$composer require remg/layout-bundle
2 在app/AppKernel.php
中注册组件
$bundles = array( // .. // Assetic Bundle new Symfony\Bundle\AsseticBundle\AsseticBundle(), // Knp Menu Bundle new Knp\Bundle\MenuBundle\KnpMenuBundle(), // Knp Paginator Bundle new Knp\Bundle\PaginatorBundle\KnpPaginatorBundle(), // Lexik Form Filter Bundle new Lexik\Bundle\FormFilterBundle\LexikFormFilterBundle(), // Liip Imagine Bundle new Liip\ImagineBundle\LiipImagineBundle(), // Remg Layout Bundle new Remg\LayoutBundle\RemgLayoutBundle(), // .. );
3 安装并导出资源
$php bin/console assets:install $php bin/console assetic:dump
4 在视图中使用布局
{% extends 'RemgLayoutBundle:admin:base.html.twig' %} {% block meta_title -%} Page title {%- endblock meta_title %} {% block body %} Hello world! {% endblock body %}