Feature #61170

sys_notes should be (optionally) displayed at top of page

Added by Bernd Wilke over 5 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2014-08-25
Due date:
% Done:

100%

PHP Version:
Tags:
Complexity:
Sprint Focus:

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.


Related issues

Related to TYPO3 Core - Bug #83699: Documentation File mentions wrong Array key Closed 2018-01-27
Duplicated by TYPO3 Core - Feature #83965: Show sys_notes optional at the top of page module Closed 2018-02-19

Associated revisions

Revision 226a7dae (diff)
Added by Georg Ringer almost 2 years ago

[FEATURE] Add drawHeaderHook to EXT:recordlist

Add an additional hook to the EXT:recordlist which makes
it possible to add content above any other content.

Resolves: #61170
Releases: master
Change-Id: I2f6ad79cfb5ff19f57da63346735b743947ddf99
Reviewed-on: https://review.typo3.org/55423
Tested-by: TYPO3com <>
Reviewed-by: Peter Kraume <>
Tested-by: Peter Kraume <>
Reviewed-by: Joerg Boesche <>
Tested-by: Joerg Boesche <>
Reviewed-by: Oliver Hader <>
Tested-by: Oliver Hader <>

History

#1 Updated by Philipp Gampe over 5 years ago

+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.

#2 Updated by Riccardo De Contardi over 4 years ago

+1, me too! I also like the idea of a setting (USER TSConfig or PAGE TSConfig)

#3 Updated by Stephan Bauer almost 4 years ago

+1

#4 Updated by Gregor Favre about 3 years ago

+1

#5 Updated by Peter Kraume almost 2 years ago

+1

#6 Updated by Gerrit Code Review almost 2 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55423

#7 Updated by Peter Kraume almost 2 years ago

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';

#8 Updated by Georg Ringer almost 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#9 Updated by Peter Kraume almost 2 years ago

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.

#10 Updated by Daniel Goerz almost 2 years ago

  • Related to Bug #83699: Documentation File mentions wrong Array key added

#11 Updated by Georg Ringer almost 2 years ago

  • Duplicated by Feature #83965: Show sys_notes optional at the top of page module added

#12 Updated by Martin Kutschker over 1 year ago

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']);

#13 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF