Skip to content
This repository was archived by the owner on Dec 1, 2021. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions 3-front-end-development/3.3-twig-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Array items can also be accessed using the subscript syntax (`[]`):
{{ foo['bar'] }}
```

From [Twig for Template Designers](http://twig.sensiolabs.org/doc/2.x/templates.html):
From [Twig for Template Designers](https://twig.symfony.com/doc/3.x/templates.html:
> For convenience's sake `foo.bar` does the following things on the PHP layer:
>
> - check if `foo` is an array and `bar` a valid element;
Expand Down Expand Up @@ -179,7 +179,7 @@ If filtering the tokens inside the {% trans %} block does not work, create a tok

## Macros

From [Twig's official macro documentation](http://twig.sensiolabs.org/doc/2.x/tags/macro.html):
From [Twig's official macro documentation](https://twig.symfony.com/doc/3.x/tags/macro.html):

> Macros are comparable with functions in regular programming languages. They are useful to put often used HTML idioms into reusable elements to not repeat yourself.

Expand Down Expand Up @@ -207,7 +207,7 @@ Here is a small example of a macro that renders a form element:
- [drupal.org: Filters - Modifying Variables In Twig Templates](https://www.drupal.org/docs/8/theming/twig/filters-modifying-variables-in-twig-templates)
- [weebpal.com: Drupal 8 Theming Essential Guide](https://www.weebpal.com/blog/drupal-8-theming)
- [sqndr.github.io: Twig Debug](https://sqndr.github.io/d8-theming-guide/twig/twig-debug.html)
- [twig.sensiolabs.org: macro](http://twig.sensiolabs.org/doc/2.x/tags/macro.html)
- [twig.symfony.com: macro](https://twig.symfony.com/doc/3.x/tags/macro.html)

---

Expand Down