我正在安装Sonata Page Bundle,一切都很好,除了当我尝试创建一个块时,我选择Block类型的步骤,我得到一个没有布局的页面(请参见附页截图)< / p>
这是我的sonata_page.yml配置文件:
sonata_page:
slugify_service: sonata.core.slugify.cocur # old BC value is sonata.core.slugify.native
multisite: host
default_template: default # template key from templates section, used as default for
templates:
default:
path: '::base.html.twig'
name: 'default'
containers:
header:
name: Header
content_top:
name: Top content
content:
name: Main content
content_bottom:
name: Bottom content
footer:
name: Footer
matrix:
layout: |
HHHHHHHH
TTTTBBBB
TTTTBBBB
TTTTBBBB
TTTTBBBB
CCCCCCCC
CCCCCCCC
FFFFFFFF
mapping:
H: header
T: content_top
C: content
B: content_bottom
F: footer
# Generates a snapshot when a page is saved (from the admin)
direct_publication: false # or %kernel.debug% if you want to publish in dev mode (but not in prod)
multisite: host
use_streamed_response: true # set the value to false in debug mode or if the reverse proxy does not handle streamed response
ignore_route_patterns:
- ^(.*)admin(.*) # ignore admin route, ie route containing 'admin'
- ^_(.*) # ignore symfony routes
ignore_routes:
- sonata_page_cache_esi
- sonata_page_cache_ssi
- sonata_page_js_sync_cache
- sonata_page_js_async_cache
- sonata_cache_esi
- sonata_cache_ssi
- sonata_cache_js_async
- sonata_cache_js_sync
- sonata_cache_apc
ignore_uri_patterns:
- ^/admin\/ # ignore admin route, ie route containing 'admin'
page_defaults:
homepage: {decorate: false} # disable decoration for homepage, key - is a page route
# manage the http errors
catch_exceptions:
not_found: [404] # render 404 page with "not_found" key (name generated: _page_internal_error_{key})
fatal: [500] # so you can use the same page for different http errors or specify specific page for each error
cmf_routing:
chain:
routers_by_id:
# enable the DynamicRouter with high priority to allow overwriting configured routes with content
# cmf_routing.dynamic_router: 200
# enable the symfony default router with a lower priority
sonata.page.router: 150
router.default: 100
我错过了什么地方吗?
非常感谢你的帮助。
答案 0 :(得分:0)
将此行添加到文件app \ config \ config.yml
sonata_admin:
assets:
javascripts:
- bundles/sonatacore/vendor/jquery/dist/jquery.min.js
- bundles/sonataadmin/vendor/jquery.scrollTo/jquery.scrollTo.min.js
- bundles/sonatacore/vendor/moment/min/moment.min.js
- bundles/sonataadmin/vendor/jqueryui/ui/minified/jquery-ui.min.js
- bundles/sonataadmin/vendor/jqueryui/ui/minified/i18n/jquery-ui-i18n.min.js
- bundles/sonatacore/vendor/bootstrap/dist/js/bootstrap.min.js
- bundles/sonatacore/vendor/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js
- bundles/sonataadmin/vendor/jquery-form/jquery.form.js
- bundles/sonataadmin/jquery/jquery.confirmExit.js
- bundles/sonataadmin/vendor/x-editable/dist/bootstrap3-editable/js/bootstrap-editable.min.js
- bundles/sonatacore/vendor/select2/select2.min.js
- bundles/sonataadmin/vendor/admin-lte/dist/js/app.min.js
- bundles/sonataadmin/vendor/iCheck/icheck.min.js
- bundles/sonataadmin/vendor/slimScroll/jquery.slimscroll.min.js
- bundles/sonataadmin/vendor/waypoints/lib/jquery.waypoints.min.js
- bundles/sonataadmin/vendor/waypoints/lib/shortcuts/sticky.min.js
- bundles/sonataadmin/Admin.js
- bundles/sonataadmin/treeview.js
- bundles/sonatapage/sonata-page.back.min.js
stylesheets:
- bundles/sonatacore/vendor/bootstrap/dist/css/bootstrap.min.css
- bundles/sonatacore/vendor/components-font-awesome/css/font-awesome.min.css
- bundles/sonatacore/vendor/ionicons/css/ionicons.min.css
- bundles/sonataadmin/vendor/admin-lte/dist/css/AdminLTE.min.css
- bundles/sonataadmin/vendor/admin-lte/dist/css/skins/skin-black.min.css
- bundles/sonataadmin/vendor/iCheck/skins/square/blue.css
- bundles/sonatacore/vendor/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css
- bundles/sonataadmin/vendor/jqueryui/themes/base/jquery-ui.css
- bundles/sonatacore/vendor/select2/select2.css
- bundles/sonatacore/vendor/select2-bootstrap-css/select2-bootstrap.min.css
- bundles/sonataadmin/vendor/x-editable/dist/bootstrap3-editable/css/bootstrap-editable.css
- bundles/sonataadmin/css/styles.css
- bundles/sonataadmin/css/layout.css
- bundles/sonataadmin/css/tree.css
- bundles/sonatapage/sonata-page.back.css