diff --git a/examples/partials/Partials.php b/examples/partials/Partials.php index 19f627a..f15d6b2 100644 --- a/examples/partials/Partials.php +++ b/examples/partials/Partials.php @@ -1,9 +1,9 @@ 'federica', 'age' => 27, 'gender' => 'female'), - array('name' => 'marco', 'age' => 32, 'gender' => 'male'), + public $page = array( + 'title' => 'Page Title', + 'subtitle' => 'Page Subtitle', + 'content' => 'Lorem ipsum dolor sit amet.', ); } diff --git a/examples/partials/partials.mustache b/examples/partials/partials.mustache index 037e1b3..54cf1c5 100644 --- a/examples/partials/partials.mustache +++ b/examples/partials/partials.mustache @@ -1,2 +1,7 @@ -Children of {{name}}: -{{>children}} \ No newline at end of file +
+ {{> header }} + +
+ {{ page.content }} +
+
\ No newline at end of file diff --git a/examples/partials/partials.txt b/examples/partials/partials.txt index d967e15..f8e45ce 100644 --- a/examples/partials/partials.txt +++ b/examples/partials/partials.txt @@ -1,3 +1,8 @@ -Children of ilmich: -federica - 27 - female -marco - 32 - male +
+

Page Title

+

Page Subtitle

+ +
+ Lorem ipsum dolor sit amet. +
+
\ No newline at end of file diff --git a/examples/partials/partials/children.mustache b/examples/partials/partials/children.mustache deleted file mode 100644 index 9506a28..0000000 --- a/examples/partials/partials/children.mustache +++ /dev/null @@ -1,2 +0,0 @@ -{{#data}}{{name}} - {{age}} - {{gender}} -{{/data}} \ No newline at end of file diff --git a/examples/partials/partials/header.mustache b/examples/partials/partials/header.mustache new file mode 100644 index 0000000..88d567b --- /dev/null +++ b/examples/partials/partials/header.mustache @@ -0,0 +1,4 @@ +{{# page }} +

{{ title }}

+

{{ subtitle }}

+{{/ page }} \ No newline at end of file