Skip to content

Commit

Permalink
[FEATURE] PageLayoutModule: Show description notes if they exists
Browse files Browse the repository at this point in the history
Resolves: #363
Releases: 8.0.0
  • Loading branch information
Alexander Opitz committed May 8, 2022
1 parent 7013d86 commit 1e94232
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions Classes/Controller/Backend/PageLayoutController.php
Expand Up @@ -214,6 +214,7 @@ public function showAction()
$this->view->assign('pageId', $this->pageId);
$this->view->assign('pageInfo', $this->pageInfo);
$this->view->assign('pageTitle', $pageTitle);
$this->view->assign('pageDescription', $activePage[$GLOBALS['TCA']['pages']['ctrl']['descriptionColumn']] ?? '');
$this->view->assign('pageDoktype', $activePage['doktype']);
$this->view->assign('pageMessages', $this->getFlashMessageQueue('TVP')->getAllMessages());

Expand Down
1 change: 1 addition & 0 deletions Classes/Service/ProcessingService.php
Expand Up @@ -110,6 +110,7 @@ public function getNodeFromRow(string $table, array $row, array $parentPointer =
'shortTitle' => GeneralUtility::fixed_lgd_cs($title, 50),
'fullTitle' => $title,
'hintTitle' => BackendUtility::getRecordIconAltText($row, $table),
'description' => ($row[$GLOBALS['TCA'][$table]['ctrl']['descriptionColumn']] ?? ''),
'partial' => 'Backend/Handler/DoktypeDefaultHandler/' . ($table === 'pages' ? 'Page' : 'Content') . 'Element',
'belongsToCurrentPage' => ($basePid === $onPid),
'countUsedOnPage' => $usedElements[$table][$row['uid']],
Expand Down
Expand Up @@ -17,6 +17,9 @@
<f:if condition="{node.rendering.countUsedOnPage} > 1">
<div class="bg-info">&nbsp;<em><core:icon identifier="status-dialog-notification" /> <f:translate key="{configuration.lllFile}:infoElementUsedMultipleTimes" arguments="{0: node.rendering.countUsedOnPage}" /></em></div>
</f:if>
<f:if condition="{node.rendering.description}">
<div class="bg-info">&nbsp;<em><core:icon identifier="status-dialog-notification" /> <f:format.nl2br>{node.rendering.description}</f:format.nl2br></em></div>
</f:if>
<f:comment>
infoElementFromOtherPage => modTSconfig['properties']['disableReferencedElementNotification']
warning_elementusedmorethanonce => modTSconfig['properties']['disableElementMoreThanOnceWarning']
Expand Down
3 changes: 3 additions & 0 deletions Resources/Private/Templates/Backend/PageLayout/Show.html
Expand Up @@ -74,6 +74,9 @@
<f:section name="Header">

<h1 id="tvpPageTitle" data-identifier="tvpPageTitle">{pageTitle}</h1>
<f:if condition="{pageDescription}">
<f:be.infobox title=""><f:format.nl2br>{pageDescription}</f:format.nl2br></f:be.infobox>
</f:if>

</f:section>

Expand Down

0 comments on commit 1e94232

Please sign in to comment.