mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-17 22:39:03 +02:00
FAF: Documentation UI Twig Blocks
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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'}} %}
|
||||
|
||||
@@ -11,3 +11,7 @@
|
||||
h3 {
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
.rst-content .code-block-caption {
|
||||
text-align: inherit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user