Manage table of contents differently

Cette révision appartient à :
Stéphane Goetz
2017-12-11 21:14:18 +01:00
Parent e844b51f10
révision 91014cef8b
14 fichiers modifiés avec 109 ajouts et 24 suppressions

Voir le fichier

@ -28,7 +28,11 @@ class Generator implements \Todaymade\Daux\Format\Base\Generator, LiveGenerator
*/
public function __construct(Daux $daux)
{
$params = $daux->getParams();
$this->daux = $daux;
$this->templateRenderer = new Template($params);
$params->templateRenderer = $this->templateRenderer;
}
/**
@ -234,6 +238,9 @@ class Generator implements \Todaymade\Daux\Format\Base\Generator, LiveGenerator
$params['request'] = $node->getUrl();
return ContentPage::fromFile($node, $params, $this->daux->getContentTypeHandler()->getType($node));
$contentPage = ContentPage::fromFile($node, $params, $this->daux->getContentTypeHandler()->getType($node));
$contentPage->templateRenderer = $this->templateRenderer;
return $contentPage;
}
}