You are here

render.html.twig in Bamboo Twig 8.5

<div class="test-render">

  <!-- Render Block Plugin -->
  <h2>Render Block Plugin</h2>
  <hr>
  <div class="render-block-plugin">{{ bamboo_render_block('system_powered_by_block') }}</div>

  <!-- Render Block Entity -->
  <h2>Render Block Entity</h2>
  <hr>
  <div class="render-block-entity">{{ bamboo_render_entity('block', 'stark_branding') }}</div>

  <!-- Render Region -->
  <h2>Render Region</h2>
  <hr>
  <div class="render-region">{{ bamboo_render_region('header') }}</div>

  <!-- Render Node -->
  <h2>Render Node</h2>
  <hr>
  <div class="render-entity-node-1">{{ bamboo_render_entity('node', 1) }}</div>
  <div class="render-entity-node-1-teaser">{{ bamboo_render_entity('node', 1, 'teaser') }}</div>
  <div class="render-entity-node-2">{{ bamboo_render_entity('node', 2) }}</div>
  <div class="render-entity-node-2-teaser">{{ bamboo_render_entity('node', 2, 'teaser') }}</div>
  <div class="render-entity-node-3">{{ bamboo_render_entity('node', 3) }}</div>
  <div class="render-entity-node-3-teaser">{{ bamboo_render_entity('node', 3, 'teaser') }}</div>
  <div class="render-entity-node-4">{{ bamboo_render_entity('node', 4) }}</div>
  <div class="render-entity-node-4-teaser">{{ bamboo_render_entity('node', 4, 'teaser') }}</div>
  <div class="render-entity-node-5">{{ bamboo_render_entity('node', 5) }}</div>
  <div class="render-entity-node-5-teaser">{{ bamboo_render_entity('node', 5, 'teaser') }}</div>

  <!-- Render Taxonomy -->
  <h2>Render Taxonomy</h2>
  <hr>
  <div class="render-entity-taxonomy-term-1">{{ bamboo_render_entity('taxonomy_term', 1) }}</div>
  <div class="render-entity-taxonomy-term-1-link">{{ bamboo_render_entity('taxonomy_term', 1, 'link') }}</div>
  <div class="render-entity-taxonomy-term-2">{{ bamboo_render_entity('taxonomy_term', 2) }}</div>
  <div class="render-entity-taxonomy-term-2-link">{{ bamboo_render_entity('taxonomy_term', 2, 'link') }}</div>
  <div class="render-entity-taxonomy-term-3">{{ bamboo_render_entity('taxonomy_term', 3) }}</div>
  <div class="render-entity-taxonomy-term-3-link">{{ bamboo_render_entity('taxonomy_term', 3, 'link') }}</div>
  <div class="render-entity-taxonomy-term-4">{{ bamboo_render_entity('taxonomy_term', 4) }}</div>
  <div class="render-entity-taxonomy-term-4-link">{{ bamboo_render_entity('taxonomy_term', 4, 'link') }}</div>
  <div class="render-entity-taxonomy-term-5">{{ bamboo_render_entity('taxonomy_term', 5) }}</div>
  <div class="render-entity-taxonomy-term-5-link">{{ bamboo_render_entity('taxonomy_term', 5, 'link') }}</div>

  <!-- Render User -->
  <h2>Render User</h2>
  <hr>
  <div class="render-entity-user">{{ bamboo_render_entity('user', 1) }}</div>
  <div class="render-entity-user-compact">{{ bamboo_render_entity('user', 1, 'compact') }}</div>

  <!-- Render Image -->
  <h2>Render Image</h2>
  <hr>
  <div class="render-image">{{ bamboo_render_image(1, 'thumbnail') }}</div>
  <div class="render-image-style-uri">style-uri-{{ bamboo_render_image_style('public://antistatique.jpg', 'thumbnail') }}</div>
  <div class="render-image-style-uri-preprocess">style-uri-preprocess-{{ bamboo_render_image_style('public://antistatique.jpg', 'thumbnail', TRUE) }}</div>

  <!-- Render Field -->
  <h2>Render Field</h2>
  <hr>
  <div class="render-field-title-node-1">{{ bamboo_render_field('title', 'node', 1) }}</div>
  <div class="render-field-title-node-2">{{ bamboo_render_field('title', 'node', 2) }}</div>
  <div class="render-field-title-node-3">{{ bamboo_render_field('title', 'node', 3) }}</div>
  <div class="render-field-title-node-4">{{ bamboo_render_field('title', 'node', 4) }}</div>
  <div class="render-field-title-node-5">{{ bamboo_render_field('title', 'node', 5) }}</div>
  <br>
  <div class="render-field-taxonomy-term-1">{{ bamboo_render_field('name', 'taxonomy_term', 1) }}</div>
  <div class="render-field-taxonomy-term-2">{{ bamboo_render_field('name', 'taxonomy_term', 2) }}</div>
  <div class="render-field-taxonomy-term-3">{{ bamboo_render_field('name', 'taxonomy_term', 3) }}</div>
  <div class="render-field-taxonomy-term-4">{{ bamboo_render_field('name', 'taxonomy_term', 4) }}</div>
  <div class="render-field-taxonomy-term-5">{{ bamboo_render_field('name', 'taxonomy_term', 5) }}</div>
  <br>
  <div class="render-field-reference-node-1">{{ bamboo_render_field('field_tags', 'node', 1) }}</div>
  <div class="render-field-reference-node-2">{{ bamboo_render_field('field_tags', 'node', 2) }}</div>
  <div class="render-field-reference-node-3">{{ bamboo_render_field('field_tags', 'node', 3) }}</div>
  <div class="render-field-reference-node-4">{{ bamboo_render_field('field_tags', 'node', 4) }}</div>
  <div class="render-field-reference-node-5">{{ bamboo_render_field('field_tags', 'node', 5) }}</div>
  <br>
  <div class="render-field-file">{{ bamboo_render_field('filename', 'file', 1) }}</div>
  <div class="render-field-user">{{ bamboo_render_field('name', 'user', 1) }}</div>

  <!-- Render Menu -->
  <h2>Render Menu</h2>
  <hr>
  <div class="render-menu-no-access">{{ bamboo_render_menu('admin') }}</div>
  <div class="render-menu-all">{{ bamboo_render_menu('admin') }}</div>
  <div class="render-menu-level">{{ bamboo_render_menu('admin', 2) }}</div>
  <div class="render-menu-depth">{{ bamboo_render_menu('admin', 1, 2) }}</div>

  <!-- Render Form -->
  <h2>Render Form</h2>
  <hr>
  <div class="render-form">{{ bamboo_render_form('system', 'CronForm') }}</div>

  <!-- Render Views -->
  <h2>Render Views</h2>
  <hr>
  <div class="render-views">{{ bamboo_render_views('who_s_new', 'block_1') }}</div>
</div>

File

tests/modules/bamboo_twig_test/templates/render.html.twig
View source
  1. <div class="test-render">
  2. <!-- Render Block Plugin -->
  3. <h2>Render Block Plugin</h2>
  4. <hr>
  5. <div class="render-block-plugin">{{ bamboo_render_block('system_powered_by_block') }}</div>
  6. <!-- Render Block Entity -->
  7. <h2>Render Block Entity</h2>
  8. <hr>
  9. <div class="render-block-entity">{{ bamboo_render_entity('block', 'stark_branding') }}</div>
  10. <!-- Render Region -->
  11. <h2>Render Region</h2>
  12. <hr>
  13. <div class="render-region">{{ bamboo_render_region('header') }}</div>
  14. <!-- Render Node -->
  15. <h2>Render Node</h2>
  16. <hr>
  17. <div class="render-entity-node-1">{{ bamboo_render_entity('node', 1) }}</div>
  18. <div class="render-entity-node-1-teaser">{{ bamboo_render_entity('node', 1, 'teaser') }}</div>
  19. <div class="render-entity-node-2">{{ bamboo_render_entity('node', 2) }}</div>
  20. <div class="render-entity-node-2-teaser">{{ bamboo_render_entity('node', 2, 'teaser') }}</div>
  21. <div class="render-entity-node-3">{{ bamboo_render_entity('node', 3) }}</div>
  22. <div class="render-entity-node-3-teaser">{{ bamboo_render_entity('node', 3, 'teaser') }}</div>
  23. <div class="render-entity-node-4">{{ bamboo_render_entity('node', 4) }}</div>
  24. <div class="render-entity-node-4-teaser">{{ bamboo_render_entity('node', 4, 'teaser') }}</div>
  25. <div class="render-entity-node-5">{{ bamboo_render_entity('node', 5) }}</div>
  26. <div class="render-entity-node-5-teaser">{{ bamboo_render_entity('node', 5, 'teaser') }}</div>
  27. <!-- Render Taxonomy -->
  28. <h2>Render Taxonomy</h2>
  29. <hr>
  30. <div class="render-entity-taxonomy-term-1">{{ bamboo_render_entity('taxonomy_term', 1) }}</div>
  31. <div class="render-entity-taxonomy-term-1-link">{{ bamboo_render_entity('taxonomy_term', 1, 'link') }}</div>
  32. <div class="render-entity-taxonomy-term-2">{{ bamboo_render_entity('taxonomy_term', 2) }}</div>
  33. <div class="render-entity-taxonomy-term-2-link">{{ bamboo_render_entity('taxonomy_term', 2, 'link') }}</div>
  34. <div class="render-entity-taxonomy-term-3">{{ bamboo_render_entity('taxonomy_term', 3) }}</div>
  35. <div class="render-entity-taxonomy-term-3-link">{{ bamboo_render_entity('taxonomy_term', 3, 'link') }}</div>
  36. <div class="render-entity-taxonomy-term-4">{{ bamboo_render_entity('taxonomy_term', 4) }}</div>
  37. <div class="render-entity-taxonomy-term-4-link">{{ bamboo_render_entity('taxonomy_term', 4, 'link') }}</div>
  38. <div class="render-entity-taxonomy-term-5">{{ bamboo_render_entity('taxonomy_term', 5) }}</div>
  39. <div class="render-entity-taxonomy-term-5-link">{{ bamboo_render_entity('taxonomy_term', 5, 'link') }}</div>
  40. <!-- Render User -->
  41. <h2>Render User</h2>
  42. <hr>
  43. <div class="render-entity-user">{{ bamboo_render_entity('user', 1) }}</div>
  44. <div class="render-entity-user-compact">{{ bamboo_render_entity('user', 1, 'compact') }}</div>
  45. <!-- Render Image -->
  46. <h2>Render Image</h2>
  47. <hr>
  48. <div class="render-image">{{ bamboo_render_image(1, 'thumbnail') }}</div>
  49. <div class="render-image-style-uri">style-uri-{{ bamboo_render_image_style('public://antistatique.jpg', 'thumbnail') }}</div>
  50. <div class="render-image-style-uri-preprocess">style-uri-preprocess-{{ bamboo_render_image_style('public://antistatique.jpg', 'thumbnail', TRUE) }}</div>
  51. <!-- Render Field -->
  52. <h2>Render Field</h2>
  53. <hr>
  54. <div class="render-field-title-node-1">{{ bamboo_render_field('title', 'node', 1) }}</div>
  55. <div class="render-field-title-node-2">{{ bamboo_render_field('title', 'node', 2) }}</div>
  56. <div class="render-field-title-node-3">{{ bamboo_render_field('title', 'node', 3) }}</div>
  57. <div class="render-field-title-node-4">{{ bamboo_render_field('title', 'node', 4) }}</div>
  58. <div class="render-field-title-node-5">{{ bamboo_render_field('title', 'node', 5) }}</div>
  59. <br>
  60. <div class="render-field-taxonomy-term-1">{{ bamboo_render_field('name', 'taxonomy_term', 1) }}</div>
  61. <div class="render-field-taxonomy-term-2">{{ bamboo_render_field('name', 'taxonomy_term', 2) }}</div>
  62. <div class="render-field-taxonomy-term-3">{{ bamboo_render_field('name', 'taxonomy_term', 3) }}</div>
  63. <div class="render-field-taxonomy-term-4">{{ bamboo_render_field('name', 'taxonomy_term', 4) }}</div>
  64. <div class="render-field-taxonomy-term-5">{{ bamboo_render_field('name', 'taxonomy_term', 5) }}</div>
  65. <br>
  66. <div class="render-field-reference-node-1">{{ bamboo_render_field('field_tags', 'node', 1) }}</div>
  67. <div class="render-field-reference-node-2">{{ bamboo_render_field('field_tags', 'node', 2) }}</div>
  68. <div class="render-field-reference-node-3">{{ bamboo_render_field('field_tags', 'node', 3) }}</div>
  69. <div class="render-field-reference-node-4">{{ bamboo_render_field('field_tags', 'node', 4) }}</div>
  70. <div class="render-field-reference-node-5">{{ bamboo_render_field('field_tags', 'node', 5) }}</div>
  71. <br>
  72. <div class="render-field-file">{{ bamboo_render_field('filename', 'file', 1) }}</div>
  73. <div class="render-field-user">{{ bamboo_render_field('name', 'user', 1) }}</div>
  74. <!-- Render Menu -->
  75. <h2>Render Menu</h2>
  76. <hr>
  77. <div class="render-menu-no-access">{{ bamboo_render_menu('admin') }}</div>
  78. <div class="render-menu-all">{{ bamboo_render_menu('admin') }}</div>
  79. <div class="render-menu-level">{{ bamboo_render_menu('admin', 2) }}</div>
  80. <div class="render-menu-depth">{{ bamboo_render_menu('admin', 1, 2) }}</div>
  81. <!-- Render Form -->
  82. <h2>Render Form</h2>
  83. <hr>
  84. <div class="render-form">{{ bamboo_render_form('system', 'CronForm') }}</div>
  85. <!-- Render Views -->
  86. <h2>Render Views</h2>
  87. <hr>
  88. <div class="render-views">{{ bamboo_render_views('who_s_new', 'block_1') }}</div>
  89. </div>