description.html.twig

{#

Description text for the JavaScript Example.

#}

{% set js_weights = path('js_example.weights') %}
{% set js_accordion = path('js_example.accordion') %}

{% trans %}

<p>Drupal includes jQuery and jQuery UI.</p>

<p>We have two examples of using these:</p>

<ol>
  <li>
    <p><a href={{ js_accordion }}>An accordion-style section reveal effect</a>:
        This demonstrates calling a JavaScript function using Drupal rendering
        system.
  </li>
  <li>
    <p><a href={{ js_weights }}>Sorting according to numeric weight</a>: This
        demonstrates attaching your own JavaScript code to individual page
        elements using Drupal rendering system.</p>
  </li>
</ol>

{% endtrans %}

File

modules/js_example/templates/description.html.twig

View source
  1. {#
  2. Description text for the JavaScript Example.
  3. #}
  4. {% set js_weights = path('js_example.weights') %}
  5. {% set js_accordion = path('js_example.accordion') %}
  6. {% trans %}
  7. <p>Drupal includes jQuery and jQuery UI.</p>
  8. <p>We have two examples of using these:</p>
  9. <ol>
  10. <li>
  11. <p><a href={{ js_accordion }}>An accordion-style section reveal effect</a>:
  12. This demonstrates calling a JavaScript function using Drupal rendering
  13. system.
  14. </li>
  15. <li>
  16. <p><a href={{ js_weights }}>Sorting according to numeric weight</a>: This
  17. demonstrates attaching your own JavaScript code to individual page
  18. elements using Drupal rendering system.</p>
  19. </li>
  20. </ol>
  21. {% endtrans %}