You are here

block--dashboard-item.html.twig in Draggable dashboard 8.2

Default theme implementation to display a block.

Available variables:

  • plugin_id: The ID of the block implementation.
  • label: The configured label of the block if visible.
  • configuration: A list of the block's configuration values.
    • label: The configured label for the block.
    • label_display: The display settings for the label.
    • provider: The module or other provider that provided this block plugin.
    • Block plugin specific settings will also be stored here.
  • content: The content of this block.
  • attributes: array of HTML attributes populated by modules, intended to be added to the main container tag of this template.

    • id: A valid HTML ID and guaranteed unique.
  • title_attributes: Same as attributes, except applied to the main title tag that appears in the template.
  • title_prefix: Additional output populated by modules, intended to be displayed in front of the main title tag that appears in the template.
  • title_suffix: Additional output populated by modules, intended to be displayed after the main title tag that appears in the template.

File

templates/block--dashboard-item.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display a block.
  5. *
  6. * Available variables:
  7. * - plugin_id: The ID of the block implementation.
  8. * - label: The configured label of the block if visible.
  9. * - configuration: A list of the block's configuration values.
  10. * - label: The configured label for the block.
  11. * - label_display: The display settings for the label.
  12. * - provider: The module or other provider that provided this block plugin.
  13. * - Block plugin specific settings will also be stored here.
  14. * - content: The content of this block.
  15. * - attributes: array of HTML attributes populated by modules, intended to
  16. * be added to the main container tag of this template.
  17. * - id: A valid HTML ID and guaranteed unique.
  18. * - title_attributes: Same as attributes, except applied to the main title
  19. * tag that appears in the template.
  20. * - title_prefix: Additional output populated by modules, intended to be
  21. * displayed in front of the main title tag that appears in the template.
  22. * - title_suffix: Additional output populated by modules, intended to be
  23. * displayed after the main title tag that appears in the template.
  24. *
  25. * @see template_preprocess_block()
  26. *
  27. * @ingroup themeable
  28. */
  29. #}
  30. <article{{ attributes.addClass('draggable-dashboard-block') }}>
  31. <header{{ title_attributes.addClass('draggable-dashboard-block__header') }}>
  32. {{ title_prefix }}
  33. <h2>{{ label }}</h2>
  34. {{ title_suffix }}
  35. <div class="draggable-dashboard-block__controls">
  36. <button class="draggable-dashboard__icon draggable-dashboard__icon--toggle draggable-dashboard__icon--collapse" title="{{ 'Collapse'|t }}"></button>
  37. <button class="draggable-dashboard__icon draggable-dashboard__icon--resize draggable-dashboard__icon--maximize" title="{{ 'Maximize'|t }}"></button>
  38. </div>
  39. </header>
  40. <div class="draggable-dashboard-block__content">
  41. {% block content %}
  42. {{ content }}
  43. {% endblock %}
  44. </div>
  45. </article>