Skip to content

Commit

Permalink
Fix alias rendering in PageTree
Browse files Browse the repository at this point in the history
  • Loading branch information
aschempp committed Apr 8, 2020
1 parent d3abce3 commit 78dfc42
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core-bundle/src/Resources/contao/widgets/PageSelector.php
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ protected function renderPagetree($id, $intMargin, $protectedPage=false, $blnNoR
// Add the current page
if (!empty($childs))
{
$return .= Image::getHtml($this->getPageStatusIcon($objPage), '', $folderAttribute) . ' <a href="' . Backend::addToUrl('pn=' . $objPage->id) . '" title="' . StringUtil::specialchars($objPage->title . ' (' . $objPage->alias . Config::get('urlSuffix') . ')') . '">' . (($objPage->type == 'root') ? '<strong>' : '') . $objPage->title . (($objPage->type == 'root') ? '</strong>' : '') . '</a></div> <div class="tl_right">';
$return .= Image::getHtml($this->getPageStatusIcon($objPage), '', $folderAttribute) . ' <a href="' . Backend::addToUrl('pn=' . $objPage->id) . '" title="' . StringUtil::specialchars($objPage->title . ' (' . $objPage->alias . ')') . '">' . (($objPage->type == 'root') ? '<strong>' : '') . $objPage->title . (($objPage->type == 'root') ? '</strong>' : '') . '</a></div> <div class="tl_right">';
}
else
{
Expand Down
7 changes: 4 additions & 3 deletions core-bundle/src/Resources/contao/widgets/PageTree.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,11 @@ public function generate()

if ($objPages !== null)
{
while ($objPages->next())
foreach ($objPages as $objPage)
{
$arrSet[] = $objPages->id;
$arrValues[$objPages->id] = Image::getHtml($this->getPageStatusIcon($objPages)) . ' ' . $objPages->title . ' (' . $objPages->alias . Config::get('urlSuffix') . ')';
$objPage->loadDetails();
$arrSet[] = $objPage->id;
$arrValues[$objPage->id] = Image::getHtml($this->getPageStatusIcon($objPage)) . ' ' . $objPage->title . ' (' . ($objPage->languagePrefix ? ($objPage->languagePrefix . '/') : '') . $objPage->alias . $objPage->urlSuffix . ')';
}
}

Expand Down

0 comments on commit 78dfc42

Please sign in to comment.