// article.phtml
<article>
<header>
<h2><a href="javascript:;"><?php echo $this->header; ?></a></h2>
</header>
<?php echo $this->body; ?>
</article>
// view script
// basic usage with array
echo $this->partial("article.phtml", array(
"header" => "This is a single post ...",
"body" => '<p>rendered via <code>$this->partial()</code></p>')
);
// passing an object with public properties
$article = new stdClass();
$article->header = "This is a \$article->header";
$article->body = "This is the \$article->body ... ";
echo $this->partial("article.phtml", $article);
// basic usage of partialLoop() with array
echo $this->partialLoop("article.phtml", array(
array(
"header" => "This is a title",
"body" => '<p>This is the body. rendered 1st post rendered via <code>$this->partialLoop()</code></p>'),
array(
"header" => "This is a 2nd article",
"body" => "<p>This is the body</p><p>some more content</p>"),
array(
"header" => "Then the 3rd",
"body" => "<p>This is the body</p><p>yet more content</p>")
));