FAF: Documentation UI Twig Blocks

This commit is contained in:
Eric
2021-05-31 09:09:50 +02:00
parent 7a82ac5580
commit 9c89687ed4
3 changed files with 12 additions and 0 deletions

View File

@@ -13,6 +13,7 @@ Create a controller into ``my-module/src/Controller``, let's call it ``MyModuleC
.. code-block:: php
:linenos:
:caption: src/Controller/MyModuleController.php
<?php
@@ -27,6 +28,7 @@ Let's add a *Hello World* operation
.. code-block:: php
:linenos:
:caption: src/Controller/MyModuleController.php
<?php
@@ -51,6 +53,7 @@ Let's create the template ``my-module/templates/HelloWorld.html.twig`` with a ni
.. code-block:: twig
:linenos:
:caption: templates/HelloWorld.html.twig
{% UITitle ForPage {sTitle:'Hello World!'} %}{% EndUITitle %}
@@ -65,6 +68,7 @@ Then create landing page for your module ``my-module/index.php``
.. code-block:: php
:linenos:
:caption: index.php
<?php

View File

@@ -8,6 +8,7 @@ We have seen in :ref:`Step2` how to create a static template. Let's send some va
.. code-block:: php
:linenos:
:caption: src/Controller/MyModuleController.php
<?php
@@ -31,6 +32,7 @@ Here two variables are created: ``sName`` and ``sDate``, we can use them in the
.. code-block:: twig
:linenos:
:caption: templates/HelloWorld.html.twig
{% UITitle ForPage {sTitle:'Hello ' ~ sName ~ '!'} %}{% EndUITitle %}
{% UIContentBlock Standard {DataAttributes: {role: 'date'}} %}
@@ -45,6 +47,7 @@ The variables can be of any type, for example you can give an array as a variabl
.. code-block:: php
:linenos:
:caption: src/Controller/MyModuleController.php
<?php
@@ -67,6 +70,7 @@ Here ``aQuarter`` is an array containing some months, we can use it in a selecto
.. code-block:: twig
:linenos:
:caption: templates/HelloWorld.html.twig
{% UITitle ForPage {sTitle:'Hello ' ~ sName ~ '!'} %}{% EndUITitle %}
{% UIContentBlock Standard {DataAttributes: {role: 'date'}} %}

View File

@@ -11,3 +11,7 @@
h3 {
font-size: 100%;
}
.rst-content .code-block-caption {
text-align: inherit;
}