In order to use the layout, your views should extend from the provided base-layout
{% extends 'AvanzuAdminThemeBundle:layout:base-layout.html.twig' %}
- title
- located in the title tag
- stylesheets
- located in the head. Please don't forget to use {{parent()}} when adding stylesheets in your view(s).
- javascripts_head
- Also located in the head. Used to integrate modernizr.js
- page_title
- H1 Tag to give the current page a headline.
- page_subtitle
- small tag inside the Headline to give extra information.
- flash_messages
- this is the area where the flasbag messages will appear.
- page_content
- This is the main content area
- javascripts
- load your js files in this block.
- javascripts_inline
- Instead of spreading inline scripts all over the page, you could use this block to group them.
You can disable or enable the alert dialog close button in the global configuration:
twig:
globals:
avanzu_adminlte_close_alert: true # default is false
the bundle comes with a set of pre packaged assets located under Resources/public/static/[dev|prod]
. These are basically the assetic groups (see below) uglified and ready to use with the regular {{ asset() }}
helper in combination with the application's environment.
example
<link rel="stylesheet" href="{{ asset('bundles/avanzuadmintheme/static/'~ app.environment ~'/styles/admin-lte-all.css') }}" />
File names
The packaged file names reflect the asset group name as follows:
- underscores are replaced with dashes
_js
and_css
suffixes are removed- javascripts will be placed under
scripts
- stylesheets will be placed under
styles
example
@admin_lte_js
will be uglified into scripts/admin-lte.js
@admin_lte_all_css
will be uglified into styles/admin-lte-all.css
In order to find the file you need, please refer to the following group setup.
the bundle integrates several asset groups to be used with assetic:
use the assetic provided {% javascripts %} tag to integrate one or several asset groups into your view.
example
{% javascripts
'@common_js'
'@admin_lte_js'
%}
<script src="{{ asset_url }}"></script>
{% endjavascripts %}
common_js (scripts/common.js)
- jquery
- jquery-ui
- undersocre
- backbone
- marionette
- bootstrapjs
tools_js (scripts/tools.js)
- momentjs
- holderjs
- spinjs
admin_lte_js (scripts/admin-lte.js)
- bootstrap-slider
- jquery.dataTables
- dataTables.bootstrap
- jquery.slimscroll
- adminLTE
admin_lte_forms_js (scripts/admin-lte-forms.js)
- bootstrap-colorpicker
- daterangepicker
- bootstrap-timepicker
- jquery.inputmask
admin_lte_wysiwyg (scripts/admin-lte-wysiwyg.js)
- bootstrap3-wysihtml
admin_lte_morris (scripts/admin-lte-morris.js)
- morrisjs
admin_lte_calendar (scripts/admin-lte-calendar.js)
- fullcalendar
admin_lte_all (scripts/admin-lte-all.js)
- tools_js
- admin_lte_forms_js
- admin_lte_wysiwyg
- admin_lte_morris
- admin_lte_calendar
- admin_lte_js
Same as with the javascript asset groups, there are predefined css groups accordingly. Please make sure to use filter="cssrewrite"
example
{% stylesheets
'@admin_lte_all_css'
filter="cssrewrite"
%}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
admin_lte_css (styles/admin-lte.css)
- jquery-ui-1.10.3.custom.css
- bootstrap.css
- slider.css
- dataTables.bootstrap.css
- font-awesome.css
- ionicons.css
- AdminLTE.css
admin_lte_forms_css (styles/admin-lte-forms.css)
- bootstrap-colorpicker.css
- daterangepicker-bs3.css
- bootstrap-timepicker.css
admin_lte_wysiswyg_css (styles/admin-lte-wysiwyg.css)
- bootstrap3-wysihtml5.css
admin_lte_morris_css (styles/admin-lte-morris.css)
- morris.css
admin_lte_calendar_css (styles/admin-lte-calendar.css)
- fullcalendar.css
admin_lte_all_css (styles/admin-lte-all.css)
- admin_lte_calendar_css
- admin_lte_morris_css
- admin_lte_wysiwyg_css
- admin_lte_forms_css
- admin_lte_css