ikimea/page-bundle

此包已被 弃用 且不再维护。未建议替代包。

一个简单的 Symfony 2 CMS 系统

安装: 37

依赖者: 0

建议者: 0

安全: 0

星标: 1

关注者: 1

分支: 1

开放问题: 0

类型:symfony-bundle

dev-master 2014-09-02 13:18 UTC

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