33 lines
705 B
PHP
33 lines
705 B
PHP
<?php namespace ProcessWire;
|
|
|
|
function renderMigas($paxina)
|
|
{
|
|
$saida = '';
|
|
|
|
$saida .= '<h1>';
|
|
if($paxina->parents->count())
|
|
{
|
|
$saida .= $paxina->parents->implode(" > ", "<a href='{url}'>{title}</a>",
|
|
array(
|
|
'append' => '>'
|
|
)
|
|
);
|
|
}
|
|
$saida .= $paxina->title . '</h1>';
|
|
|
|
return $saida;
|
|
}
|
|
|
|
function renderMenu($menu, $paxinas)
|
|
{
|
|
$saida = '';
|
|
|
|
$saida .= $paxinas->implode("\n", "<li><a href=\"{url}\">{title}</a></li>",
|
|
array(
|
|
'prepend' => '<nav id="' . $menu . '">' . "\n" . '<ul>' . "\n",
|
|
'append' => "\n" . '</ul>' . "\n" . '</nav>' . "\n"
|
|
)
|
|
);
|
|
|
|
return $saida;
|
|
}
|