ikimea / page-bundle
此包已被 弃用 且不再维护。未建议替代包。
一个简单的 Symfony 2 CMS 系统
dev-master
2014-09-02 13:18 UTC
Requires
- php: >=5.3.2
- egeloen/ckeditor-bundle: 2.*
- friendsofsymfony/jsrouting-bundle: dev-master
- knplabs/knp-menu-bundle: 1.1.*
- simplethings/entity-audit-bundle: 0.*@dev
- sonata-project/seo-bundle: dev-master
This package is auto-updated.
Last update: 2022-02-01 12:20:41 UTC
README
此项目已不再由 Ikimea 维护
快速安装
$ composer require ikimea/page-bundle "dev-master"
将包添加到您的应用内核
// app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Ikimea\PageBundle\IkimeaPageBundle(), new FOS\JsRoutingBundle\FOSJsRoutingBundle(), new Ivory\CKEditorBundle\IvoryCKEditorBundle(), // ... ); }
在 app/config/routing.yml 中注册路由定义
# app/config/routing.yml IkimeaPageBundle: resource: "@IkimeaPageBundle/Resources/config/routing.yml" prefix: / fos_js_routing: resource: "@FOSJsRoutingBundle/Resources/config/routing/routing.xml"
使用方法
在布局中添加行
<script src="{{ asset('bundles/fosjsrouting/js/router.js') }}"></script> <script src="{{ path('fos_js_routing_js', {"callback": "fos.Router.setData"}) }}"></script>{% include 'IkimeaPageBundle:Default:css.html.twig' %} {% include 'IkimeaPageBundle:Default:toolbar.html.twig' %} {% include 'IkimeaPageBundle:Default:js.html.twig' %}
安装资源
$ php app/console assets:install web --symlink