Skip to content

Commit 773045a

Browse files
committed
Add section for template functions
1 parent 7730216 commit 773045a

File tree

1 file changed

+27
-0
lines changed
  • development/development/upgrade

1 file changed

+27
-0
lines changed

development/development/upgrade/400.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,3 +410,30 @@ Also have a look at the `phpBB API documentation <https://area51.phpbb.com/docs/
410410
* **Type of change:** The type of change, e.g. added, changed, deprecated, or removed in this version.
411411
* **Version:** Version in which this change was introduced.
412412
* **Explanation:** The suggested approach to handle the change. This could involve using an alternative function, migrating code to a new approach, or providing additional information.
413+
414+
Template function changes
415+
=========================
416+
The following table lists function changes that might affect custom Style or Extension code.
417+
418+
.. list-table::
419+
:widths: 15 10 10 65
420+
:header-rows: 1
421+
422+
* - Function
423+
- Type of change
424+
- Version
425+
- Explanation
426+
* - ``Icon()``
427+
- Added
428+
- ``4.0.0-a1``
429+
- Icons may be rendered using ``{{ Icon('font', 'bold') }}`` in Twig instead of manually writing HTML like ``<i class="fa-bold icon"></i>``
430+
431+
Arguments:
432+
433+
- Icon type ('font' | 'png' | 'svg')
434+
- Icon name (e.g.: 'bold')
435+
- Icon title; optional, default: empty ``''``
436+
- Hide the icon title from view; optional, default: ``false``
437+
- Additional classes (e.g.: 'fa-fw'); optional, defaul:t ``'fas'``
438+
- Additional attributes for the icon, where the key is the attribute, ``{'data-ajax': 'mark_forums'}`` results in ``data-ajax="mark_forums"``; optional, default: ``{}``
439+

0 commit comments

Comments
 (0)