Feature #61170
closed
sys_notes should be (optionally) displayed at top of page
Added by Bernd Wilke about 10 years ago.
Updated about 6 years ago.
Category:
Backend User Interface
Description
as a page may contain a lot of records the display of ext:sys_note records at the end of the page (list-view/page-view) get lost and trying to provide editors with important information is in vain.
as it may give users of ext:sys_note which are happy with the placement at the end it would be desirable to configure ext:sys_note to display records at the top of the page. Maybe in an accordion, so they use less space for those who know the information already, but the headline is eye-catching enough to be noticed by any editor.
+1, I like the idea. Should this be a global option or one for each note item. I could imagine a new backend user setting for this.
+1, me too! I also like the idea of a setting (USER TSConfig or PAGE TSConfig)
- Status changed from New to Under Review
This patch works fine for me. Tested with TYPO3 8.7.
Note: this patch will not be integrated in TYPO3 8.7 due to the feature freeze.
If you want to use it with TYPO3 8.7, you can xclass the core or patch it if you use Composer:
- composer require cweagans/composer-patches
- download the diff from Gerrit: https://review.typo3.org/changes/55423/revisions/80047d68ebf19944613682d320e3089c34be5fd2/patch?zip
- put the patch file to build/patches or a similar location
- add this to the "extra" section of your composer.json
"patches": {
"typo3/cms": {
"Hook for sys_notes #61170": "build/patches/80047d6.diff"
}
}
- composer update typo3/cms
- last but not least, use the new hook in your ext_localconf.php:
// reset hook from sys_note to render notes at the bottom of the list module
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['recordlist/Modules/Recordlist/index.php']['drawFooterHook']['sys_note'] = '';
// render sys_note notes in the header instead
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['recordlist/Modules/Recordlist/index.php']['drawHeaderHook']['sys_note'] = \TYPO3\CMS\SysNote\Hook\RecordListHook::class . '->render';
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Well, the hook is now available to place sys_notes records on top of the list module.
But I think what Bernd Wilke had in mind was a more configurable solution.
Currently you need to put some PHP code e.g. to your theme package to tackle this.
For me it's sufficent but for other integrators it might be more useful to have a configuration option in EM or via TSConfig.
- Related to Bug #83699: Documentation File mentions wrong Array key added
- Has duplicate Feature #83965: Show sys_notes optional at the top of page module added
Use this code to remove the rendering in the footer. Setting the function name to an empty string will make the BE try calling a not existing funcition, resulting in a debug message in the BE (depending on your settings).
// reset hook from sys_note to render notes at the bottom of the list module
unset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['recordlist/Modules/Recordlist/index.php']['drawFooterHook']['sys_note']);
- Status changed from Resolved to Closed
Also available in: Atom
PDF