我有一个要修改的现有Symfony 4应用程序。我想添加一个新页面,并在左侧栏中包含指向该页面的链接 https://image.ibb.co/dZnjbV/Capture.jpg
我的sonata_admin.yaml看起来像这样
sonata_admin:
title: 'GPAC'
title_logo: img/logo.png
templates:
layout: "base.html.twig"
dashboard: "Core/dashboard.html.twig"
list_block: "Block/block_admin_list.html.twig"
edit: "CRUD/edit.html.twig"
list: "CRUD/list.html.twig"
options:
title_mode: 'single_text'
security:
handler: sonata.admin.security.handler.role
role_admin: ROLE_ADMIN
role_super_admin: ROLE_SUPER_ADMIN
dashboard:
blocks:
-
position: left
type: sonata.block.service.template
settings:
template: "Block/block_alert.html.twig"
-
position: right
type: sonata.block.service.template
settings:
template: "Block/block_activity.html.twig"
groups:
admin:
label: 'Administration'
icon: '<i class="fa fa-database"></i>'
skill:
label: 'Matrice de compétences'
icon: '<i class="fa fa-tasks"></i>'
rc:
label: 'Gestion des ressources'
icon: '<i class="fa fa-user-circle-o"></i>'
frc:
label: 'Suivi de compétence des ressources'
icon: '<i class="fa fa-search"></i>'
client:
label: 'Client (OEC)'
icon: '<i class="fa fa-building-o"></i>'
project:
label: 'Gestion d''acréditation'
icon: '<i class="fa fa-folder-open-o"></i>'
council:
label: 'Comités & Réunions'
icon: '<i class="fa fa-calendar"></i>'
assets:
extra_stylesheets:
- bundles/sonataadmin/vendor/admin-lte/dist/css/skins/_all-skins.min.css
remove_stylesheets:
- bundles/sonatacore/vendor/components-font-awesome/css/font-awesome.min.css
sonata_block:
# default_contexts: [cms]
blocks:
sonata.admin.block.admin_list:
contexts: [admin]
sonata.admin.block.search_result:
contexts: [admin]
sonata.block.service.text:
contexts: [admin]
sonata.block.service.template:
contexts: [admin]
我的 src 文件夹就像这个https://image.ibb.co/eBFHVq/Capture2.jpg
任何帮助将不胜感激
答案 0 :(得分:0)
要添加自定义管理页面: 您可以执行与Symfony非常相似的操作:
由here找到kunicmarko20的完整示例