0

I'ld like to order my records. I've already set the default ordering in the repository class:

protected $defaultOrderings = array(
    'title'=> Tx_Extbase_Persistence_QueryInterface::ORDER_ASCENDING
);

But when creating a translation of a record with a different title, the output is still ordered by the titles of the default language. Is there a way to fix this?

Sven
  • 722
  • 1
  • 7
  • 25

1 Answers1

1

What version are you using? Since TYPO3 6.0 you can do the following:

$querySettings = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');

$querySettings->setSysLanguageUid(42);

Source: http://forge.typo3.org/projects/typo3v4-mvc/wiki/Default_Orderings_and_Query_Settings_in_Repository

Wipster
  • 1,510
  • 1
  • 15
  • 32
  • Thank you for this hint. I am using TYPO3 4.7.14 and Extbase 4.7.7 and this function is not available there. – Sven Aug 08 '13 at 09:57