#24019Enhance IRRE to allow new records to appear at the top
Description
The current implementation always adds new IRRE records after all or after an already existing record.
There are some cases, when the ordering of the list is not relevant or if you sort the records e.g. by date, the newest one should be displayed at the top.
If the list of records is very long, the only visual feedback you get is a growing scrollbar, so some people might click “Create new” several times until they realize the that something happend.
Solution: add new config option “newRecordPosition” in the appearance section
prototype already has actions to make a “Insertion.Top”, so the only big change is to let IRRE use that function and reorder the list of records right.
How to test:
- install the extension “irre_tutorial” and import the sample t3d to get something to work on
- add this to your extTables.php to create all new relations at the top:
t3lib_div::loadTCA(‘tx_irretutorial_1ncsv_hotel’);
t3lib_div::loadTCA(‘tx_irretutorial_1nff_hotel’);
t3lib_div::loadTCA(‘tx_irretutorial_mnasym_hotel’);
t3lib_div::loadTCA(‘tx_irretutorial_mnattr_hotel’);
t3lib_div::loadTCA(‘tx_irretutorial_mnmmasym_hotel’);
t3lib_div::loadTCA(‘tx_irretutorial_mnsym_hotel’);
$GLOBALS[‘TCA’][‘tx_irretutorial_1ncsv_hotel’][‘columns’][‘offers’][‘config’][‘appearance’][‘newRecordPosition’] = ‘top’;
$GLOBALS[‘TCA’][‘tx_irretutorial_1nff_hotel’][‘columns’][‘offers’][‘config’][‘appearance’][‘newRecordPosition’] = ‘top’;
$GLOBALS[‘TCA’][‘tx_irretutorial_mnasym_hotel’][‘columns’][‘offers’][‘config’][‘appearance’][‘newRecordPosition’] = ‘top’;
$GLOBALS[‘TCA’][‘tx_irretutorial_mnattr_hotel’][‘columns’][‘offers’][‘config’][‘appearance’][‘newRecordPosition’] = ‘top’;
$GLOBALS[‘TCA’][‘tx_irretutorial_mnmmasym_hotel’][‘columns’][‘offers’][‘config’][‘appearance’][‘newRecordPosition’] = ‘top’;
$GLOBALS[‘TCA’][‘tx_irretutorial_mnsym_hotel’][‘columns’][‘branches’][‘config’][‘appearance’][‘newRecordPosition’] = ‘top’;
If you want to check one level deeper, you can add something like this:
$GLOBALS[‘TCA’][‘tx_irretutorial_1ncsv_offer’][‘columns’][‘prices’][‘config’][‘appearance’][‘newRecordPosition’] = ‘top’;
Note: there will be an error on saving records on the page “m:n asymmetric combo”, but this has nothing do to with the patch.
See http://bugs.typo3.org/view.php?id=15996 for that.
For the pending documentation:
= doc_core_api (4.5) =
Chapter: Table Configuration Array, $TCA
Part: [‘columns’][fieldname][‘config’] / TYPE: “inline”
Field: appeareance:
newRecordPosition (string)
Values: ‘top’, ‘bottom’ – default: ‘bottom’
Defines where the new record is inserted in the list of records.
(issue imported from #M16350)
Reviews 1
Related issues 7
- Feature #23954Create new Element Button always inserts new record at the bottom
- Feature #78532Improve way of adding a new image reference in TCE Forms
- Feature #83858Add option to change the insert position for inline elements (IRRE)
- Bug #84695New irre elements appear outside of the current view
- Feature #85986Create new inline record before the existing ones
- Bug #87797IRRE - Position of new elements
- Feature #91788Let editor choose where to insert file in selector
History 3132
Show 7 earlier messages
-
Andreas Kießling commented <span data-processor="relativetime" data-value="2010-11-12T12:21:01+00:00" > 11/12/10, 12:21 </span>
-
Andreas Kießling commented <span data-processor="relativetime" data-value="2010-11-16T00:32:17+00:00" > 11/16/10, 00:32 </span>
v2 adds new config setting ‘auto’ for newRecordPosition as suggested in http://bugs.typo3.org/view.php?id=16264
With both “Create new’-Links, clicking on the top one inserts the new record at the top, clicking on the bottom link inserts the new record at the bottom.Example config:t3lib_div::loadTCA(‘tx_irretutorial_1ncsv_hotel’);
$GLOBALS[‘TCA’][‘tx_irretutorial_1ncsv_hotel’][‘columns’][‘offers’][‘config’][‘appearance’][‘levelLinksPosition’] = ‘both’;
$GLOBALS[‘TCA’][‘tx_irretutorial_1ncsv_hotel’][‘columns’][‘offers’][‘config’][‘appearance’][‘newRecordPosition’] = ‘auto’;t3lib_div::loadTCA(‘tx_irretutorial_1nff_hotel’);
$GLOBALS[‘TCA’][‘tx_irretutorial_1nff_hotel’][‘columns’][‘offers’][‘config’][‘appearance’][‘levelLinksPosition’] = ‘both’;
$GLOBALS[‘TCA’][‘tx_irretutorial_1nff_hotel’][‘columns’][‘offers’][‘config’][‘appearance’][‘newRecordPosition’] = ‘auto’;t3lib_div::loadTCA(‘tx_irretutorial_mnasym_hotel’);
$GLOBALS[‘TCA’][‘tx_irretutorial_mnasym_hotel’][‘columns’][‘offers’][‘config’][‘appearance’][‘levelLinksPosition’] = ‘both’;
$GLOBALS[‘TCA’][‘tx_irretutorial_mnasym_hotel’][‘columns’][‘offers’][‘config’][‘appearance’][‘newRecordPosition’] = ‘auto’;t3lib_div::loadTCA(‘tx_irretutorial_mnattr_hotel’);
$GLOBALS[‘TCA’][‘tx_irretutorial_mnattr_hotel’][‘columns’][‘offers’][‘config’][‘appearance’][‘levelLinksPosition’] = ‘both’;
$GLOBALS[‘TCA’][‘tx_irretutorial_mnattr_hotel’][‘columns’][‘offers’][‘config’][‘appearance’][‘newRecordPosition’] = ‘auto’;t3lib_div::loadTCA(‘tx_irretutorial_mnsym_hotel’);
$GLOBALS[‘TCA’][‘tx_irretutorial_mnsym_hotel’][‘columns’][‘offers’][‘config’][‘appearance’][‘levelLinksPosition’] = ‘both’;
$GLOBALS[‘TCA’][‘tx_irretutorial_mnsym_hotel’][‘columns’][‘branches’][‘config’][‘appearance’][‘newRecordPosition’] = ‘auto’;t3lib_div::loadTCA(‘tx_irretutorial_mnmmasym_hotel’);
$GLOBALS[‘TCA’][‘tx_irretutorial_mnmmasym_hotel’][‘columns’][‘offers’][‘config’][‘appearance’][‘levelLinksPosition’] = ‘both’;
$GLOBALS[‘TCA’][‘tx_irretutorial_mnmmasym_hotel’][‘columns’][‘offers’][‘config’][‘appearance’][‘newRecordPosition’] = ‘auto’; -
Chris topher commented <span data-processor="relativetime" data-value="2010-11-16T00:37:09+00:00" > 11/16/10, 00:37 </span>
Fixed the category.
-
Andreas Kießling commented <span data-processor="relativetime" data-value="2010-11-16T00:43:35+00:00" > 11/16/10, 00:43 </span>
Thanks.
-
Webadmin no-lastname-given commented <span data-processor="relativetime" data-value="2011-01-31T09:55:32+00:00" > 01/31/11, 09:55 </span>
See also http://bugs.typo3.org/view.php?id=16264
This patch here would solve a great usability problem. -
Andreas Kießling commented <span data-processor="relativetime" data-value="2011-01-31T11:14:36+00:00" > 01/31/11, 11:14 </span>
Too late for 4.5 now, has to wait for 4.6
-
Webadmin no-lastname-given commented and changed target version <span data-processor="relativetime" data-value="2011-08-18T18:57:57+00:00" > 08/18/11, 18:57 </span>
Is it’s again to late for 4.6 ?
-
Chris topher changed target version <span data-processor="relativetime" data-value="2011-10-25T23:45:07+00:00" > 10/25/11, 23:45 </span>
-
Chris topher changed target version <span data-processor="relativetime" data-value="2011-11-30T20:06:21+00:00" > 11/30/11, 20:06 </span>
-
Xavier Perseguers changed target version <span data-processor="relativetime" data-value="2012-02-07T09:01:13+00:00" > 02/07/12, 09:01 </span>
-
Thorsten Kahler changed category <span data-processor="relativetime" data-value="2012-05-21T18:02:54+00:00" > 05/21/12, 18:02 </span>
-
Georg Ringer commented and changed status
NewResolved <span data-processor="relativetime" data-value="2014-12-14T21:52:22+00:00" > 12/14/14, 21:52 </span>config
$config['appearance']['levelLinksPosition']can be set to “‘top’, ‘bottom’, ‘both’, ‘none’@”. -
Andreas Kießling commented <span data-processor="relativetime" data-value="2014-12-14T23:20:32+00:00" > 12/14/14, 23:20 </span>
Georg Ringer wrote:
> config$config['appearance']['levelLinksPosition']can be set to “‘top’, ‘bottom’, ‘both’, ‘none’@”.But that just affects the position of the button and not where new records are placed!
-
Alexander Opitz commented and changed status
ResolvedAccepted <span data-processor="relativetime" data-value="2014-12-15T11:02:43+00:00" > 12/15/14, 11:02 </span>@Andreas
Can you please update your patch with jQuery? -
Abin Sabu commented <span data-processor="relativetime" data-value="2015-03-26T14:55:02+00:00" > 03/26/15, 14:55 </span>
Hi guys.
Do you have any work around for this problem!!
Abin
-
Abin Sabu commented <span data-processor="relativetime" data-value="2015-03-26T14:57:00+00:00" > 03/26/15, 14:57 </span>
Andreas Kiessling wrote:
> Georg Ringer wrote:
> > config$config['appearance']['levelLinksPosition']can be set to “‘top’, ‘bottom’, ‘both’, ‘none’@”.
>
> But that just affects the position of the button and not where new records are placed!Guys
Yea it affects the botton postion.No change for new record!!
Abin Sabu
-
Webadmin no-lastname-given commented <span data-processor="relativetime" data-value="2015-03-26T15:05:30+00:00" > 03/26/15, 15:05 </span>
Abin Sabu wrote:
> Hi guys.
>
> Do you have any work around for this problem!!
>
> AbinThere is a patch on the top of this ticket. I tested it 4 years ago, it worekd.
-
Riccardo De Contardi changed Related to #78532 <span data-processor="relativetime" data-value="2017-05-01T19:22:33+00:00" > 05/01/17, 19:22 </span>
-
Tymoteusz Motylewski changed Related to #83858 <span data-processor="relativetime" data-value="2018-03-09T11:38:33+00:00" > 03/09/18, 11:38 </span>
-
Riccardo De Contardi changed Related to #84695 <span data-processor="relativetime" data-value="2018-04-11T22:28:14+00:00" > 04/11/18, 22:28 </span>
-
Georg Ringer changed Related to #87797 <span data-processor="relativetime" data-value="2019-02-26T23:03:11+00:00" > 02/26/19, 23:03 </span>
-
Riccardo De Contardi changed Related to #85986 <span data-processor="relativetime" data-value="2019-04-23T11:06:45+00:00" > 04/23/19, 11:06 </span>
-
Anonymous commented <span data-processor="relativetime" data-value="2020-07-06T15:49:51+00:00" > 07/06/20, 15:49 </span>
This would still be AWESOME to have in 2020!
-
Riccardo De Contardi changed Related to #91788 <span data-processor="relativetime" data-value="2020-10-18T16:53:06+00:00" > 10/18/20, 16:53 </span>
-
Christian Toffolo commented <span data-processor="relativetime" data-value="2020-10-26T08:35:47+00:00" > 10/26/20, 08:35 </span>
Instead of simply allow new IRRE records to appear at the top, it would be better to imitate List Module behavior: a ] button at the top of the records list to add the new IRRE record as first and a [ button in each IRRE record to add the new record after the one with the button.
-
Christian Toffolo changed parent task #93528 <span data-processor="relativetime" data-value="2023-04-23T07:21:09+00:00" > 04/23/23, 07:21 </span>
-
Marc Hirdes commented <span data-processor="relativetime" data-value="2026-07-09T13:10:57+00:00" > 07/09/26, 13:10 </span>
A costumer of us would also like to have this feature. It could be also a solution to add “move to first postion” and “move to last postion” buttons.
-
Garvin Hicking commented <span data-processor="relativetime" data-value="2026-07-09T14:42:56+00:00" > 07/09/26, 14:42 </span>
Marc Hirdes wrote in #note-27:
> A costumer of us would also like to have this feature. It could be also a solution to add “move to first postion” and “move to last postion” buttons.That sounds good, would you like to contribute a patch for this maybe?
-
Gerrit Code Review pushed patch set 1 for main to change 94720 status
AcceptedUnder Review <span data-processor="relativetime" data-value="2026-07-09T14:53:20+00:00" > 07/09/26, 14:53 </span> -
Georg Ringer commented <span data-processor="relativetime" data-value="2026-07-09T14:54:19+00:00" > 07/09/26, 14:54 </span>
to be discussed: how much does a new setting make sense and should be levelLinksPosition used, e.g. if that is set to “both”, it is strange that there are 2 buttons but they do the same.
-
Andreas Kießling commented <span data-processor="relativetime" data-value="2026-07-09T14:57:47+00:00" > 07/09/26, 14:57 </span>
> it is strange that there are 2 buttons but they do the same.
I think back then my patch allowed to insert the record depending on the clicked button. So top button: insert at the top, bottom bottom: append to bottom
-
Webadmin no-lastname-given commented <span data-processor="relativetime" data-value="2026-07-09T14:59:15+00:00" > 07/09/26, 14:59 </span>
Georg Ringer wrote in #note-30:
> to be discussed: how much does a new setting make sense and should be levelLinksPosition used, e.g. if that is set to “both”, it is strange that there are 2 buttons but they do the same.That is exactly our point. With “both,” the top button should insert the new elements at the top, and the bottom button should append the elements at the bottom.
Category should have been “Inline Relational Record Editing (IRRE) “
Can somebody please adjust that?