Difference between revisions of "ARK2/Templates"

From ARK
Jump to: navigation, search
(Created page with "= Templates = ARK2 uses the TWIG templating engine to define the Front-end web views. See the [http://twig.sensiolabs.org/documentation Twig documentation] on general use of...")
 
(Templates)
Line 5: Line 5:
 
See the [http://twig.sensiolabs.org/documentation Twig documentation] on general use of Twig.
 
See the [http://twig.sensiolabs.org/documentation Twig documentation] on general use of Twig.
  
See the [http://silex.sensiolabs.org/doc/providers/twig.html Silex documentation] for using TWIG with Silex.
+
See the [http://silex.sensiolabs.org/doc/providers/twig.html Silex documentation] for using TWIG with the Silex Framework.
  
See the [http://symfony.com/doc/current/templating.html Symfony documentation
+
See the [http://symfony.com/doc/current/templating.html Symfony documentation] for using TWIG with the Symfony Components
  
 
== Extensions ==
 
== Extensions ==

Revision as of 13:37, 2 January 2017

Templates

ARK2 uses the TWIG templating engine to define the Front-end web views.

See the Twig documentation on general use of Twig.

See the Silex documentation for using TWIG with the Silex Framework.

See the Symfony documentation for using TWIG with the Symfony Components

Extensions

TWIG can easily be extended with custom extensions to the template language. ARK2 ships with a number of common extensions, as well as some ARK-specific extensions.

  • ARK:
    • translate: An extension to the standard Symfony trans option to add support for ARK Translation Roles, see Translation page.
    • translatechoice: An extension to the standard Symfony transchoice option to add support for ARK Translation Roles, see Translation page.
  • Official Twig Extensions:
    • Text: Provides useful filters for text manipulation;
    • Intl: Adds a filter for localization of DateTime objects, numbers and currency;
    • Array: Provides useful filters for array manipulation;
    • Date: Adds a filter for rendering the difference between dates.