[TYPO3-mvc] Sorting based on related objects

Henjo Hoeksma me at henjohoeksma.nl
Fri Dec 30 10:39:03 CET 2011


Hey Frank,

thanks for your thoughts. This would work if there wasn't another
restriction (which I didn't mention, stupid). Within the title I need to
have some order which can't be done on the title property and needs an
extra sorting column (it feels dirty, but works well). For example: some
positions should be put above other positions.

Basically what I need to do is sort apples based on their sort. And one of
them is a mandarin. It's just not possible... The need to solve this has
passed since the client understands the difficulty and it doesn't feel
right to invest in solving this now for 2% or less from the persons
database.

Still... it's a challenge :-)

Have a great switch in years!

Kind regards,

Henjo

Problems are small because we learned how to deal with them.
Problems are big because we need to learn how to deal with them.


On Thu, Dec 29, 2011 at 20:52, Frank Krüger <fkrueger-ml at mp-group.net>wrote:

> Hi Henjo,
>
> you could create a field 'position.type', type integer, set this to
> - normal position: 0
> - override position: 1
> - global override position: 2
>
> and modify your query to
>  ORDER BY position.type DESC, position.title ASC, lastName ASC
>
> Cheers,
> Frank
>
>
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
>


More information about the TYPO3-project-typo3v4mvc mailing list