Browse Source

Add a simple BLOCKS pragma example.

Justin Hileman 10 năm trước cách đây
mục cha
commit
664895f4b9

+ 6 - 0
test/fixtures/examples/blocks/Blocks.php

@@ -0,0 +1,6 @@
+<?php
+
+class Blocks
+{
+    public $items = array(1, 2, 3);
+}

+ 4 - 0
test/fixtures/examples/blocks/blocks.mustache

@@ -0,0 +1,4 @@
+{{% BLOCKS }}
+{{< parent }}
+{{$ value }}[{{ . }}]{{/ value }}
+{{/ parent }}

+ 3 - 0
test/fixtures/examples/blocks/blocks.txt

@@ -0,0 +1,3 @@
+[1]
+[2]
+[3]

+ 4 - 0
test/fixtures/examples/blocks/partials/parent.mustache

@@ -0,0 +1,4 @@
+{{% BLOCKS }}
+{{# items }}
+{{$ value }}ignored{{/ value }}
+{{/ items }}