[TYPO3-irre] Sorting of IRRE Children

Oliver Hader oh at inpublica.de
Fri Sep 14 08:25:56 CEST 2007


Hi Jeff,

Jeff Segars schrieb:
> Hey Olly,
> I've got an interesting issue with sorting of IRRE children. In my
> extension, I have categories and child records within those
> categories.  The child records can be manually sorted within the
> backend list view and this manual sorting is reused when displaying
> the records in the frontend.
> 
> When I add a new child record via IRRE, the sorting for every child
> record within a category is updated. I return to list view and they're
> all grouped together at the top of the list. Obviously, this messes up
> the previous manual sort order but I don't think there's a clear way
> that the list view sorting of all records and IRRE sorting of child
> records can co-exist.
> 
> Is there any way to disable manual sorting for a particular table
> within IRRE while still allowing it within the standard backend list
> view?

If using $TCA[<table>]['ctrl']['sortby'] for both - list view and IRRE -
it will lead to conflicts. IRRE creates the sort indexes only for the
scope of the parent object and the list module does this for all child
records.

But you could use and individual field that stores the sorting if used
in the IRRE context by setting the 'foreign_sortby' property, e.g.

$TCA[<table>]['columns'][<field>]['config'] = array(
  'type' => 'inline',
  'foreign_table' => 'tx_myext_child',
  'foreign_field' => 'parent',
  'foreign_sortby' => 'sorting',
  ...
);

Hope that helps in your situation.


olly
-- 
Oliver Hader
http://inpublica.de/


More information about the TYPO3-project-irre mailing list