1
0
mirror of https://github.com/typemill/typemill.git synced 2025-10-17 07:36:24 +02:00

latest 20171218

This commit is contained in:
Sebastian
2017-12-18 10:20:36 +01:00
parent 4cb743c2ae
commit 5fa14fb838
18 changed files with 175 additions and 115 deletions

View File

@@ -8,6 +8,8 @@ Twig is a flexible, fast and secure template engine for PHP. If you have never u
The full Twig documentation for template designers is just one page long, so just head [over to Twig](http://twig.sensiolabs.org/doc/2.x/templates.html) and read it. You can learn the most important essentials for TYPEMILL in the following list.
[TOC]
## Basic Twig Syntax
In a Twig template, you can use ordinary HTML markup. Statements and expressions are written in curly brackets.
@@ -183,9 +185,9 @@ Macros in Twig are like functions in PHP: You can use them for repeating tasks.
This is an example for a navigation:
{% macro loop_over(navigation) %}
{% import _self as macros %}
{% for element in navigation %}
<li>
{% if element.elementType == 'folder' %}

View File

@@ -4,6 +4,8 @@ The item variable is an object. It provides informations about the actual page,
Some informations are only available for the type `folder` while some other informations are specific to the type `file`. But most informations are shared by both.
[TOC]
## Example of the {{ item }} variable
This is an example of an item variable: