Small fixes in url generations

This commit is contained in:
Stéphane Goetz
2015-07-21 09:51:55 +02:00
parent 16f15ae2b2
commit 12739c2044
3 changed files with 9 additions and 6 deletions

View File

@ -40,7 +40,8 @@ class MarkdownPage extends \Todaymade\Daux\Format\Base\MarkdownPage
$breadcrumb_trail = array();
if (!empty($parents)) {
foreach ($parents as $node) {
$breadcrumb_trail[$node->getTitle()] = $node->getUrl();
$page = $node->getIndexPage() ?: $node->getFirstPage();
$breadcrumb_trail[$node->getTitle()] = $page? $page->getUrl() : '';
}
}
return $breadcrumb_trail;