Browse Source

Fix for infinite recursion in recursive partials example.

Justin Hileman 15 years ago
parent
commit
605dea1f79
1 changed files with 4 additions and 3 deletions
  1. 4 3
      examples/recursive_partials/RecursivePartials.php

+ 4 - 3
examples/recursive_partials/RecursivePartials.php

@@ -2,14 +2,15 @@
 
 class RecursivePartials extends Mustache {
 	protected $_partials = array(
-		'child' => "* {{ name }}",
+		'child' => "* {{ name }}\n{{#child}}{{>child}}\n{{/child}}",
 	);
 
 	public $name  = 'George';
 	public $child = array(
-		'name' => 'Dan',
+		'name'  => 'Dan',
 		'child' => array(
-			'name' => 'Justin',
+			'name'  => 'Justin',
+			'child' => false,
 		)
 	);
 }