Project

General

Profile

Actions

Feature #19583

closed

Post-Sort TS for the cObject CONTENT

Added by Niels Fröhling about 16 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2008-11-07
Due date:
% Done:

0%

Estimated time:
PHP Version:
5.3
Tags:
Complexity:
Sprint Focus:

Description

This adds a parallel orderObj to renderObj which is used to post-sort the iterated content-elements.

...
orderObj = USER
orderObj {
userFunc = mycustom_sort
}
...

(issue imported from #M9752)


Files

Actions #1

Updated by Oliver Hader about 16 years ago

Could please give a full example about the initial haystack to be sorted an what criteria should be taken. Additionally, please create patches with "diff -ru OLD NEW". Thanks!

Actions #2

Updated by Niels Fröhling about 16 years ago

Okay I pushed a new diff.

This is an example in-production. The criteria to sort the entries in this case is a resolved flex-field "field_start" and thus unavailable to the ordering available by select{}. The 'orderObj' is basically a parallel alternative /view/ of the 'renderObj' with the difference that its produced content is taken for sorting instead of display.

10 = CONTENT
10.source.current = 1
10 {
table = tt_content

select {
pidInList = 26
where = tx_templavoila_to IN(1)
}
orderMax = 5
orderObj = USER
orderObj {
userFunc = tx_bestgetflexfield_pi1->getFieldValue
dbField = tx_templavoila_flex
flexField = field_start
}
renderObj = COA
renderObj {
10 < tt_content
}
}

This is just a simple example. Other uses may involve the calculation of values out of regular database entries through a different userFunc like:

orderObj.userFunc = calculateTax() {
if (field_is_not_ngo)
return field_price + tax[field_tax_class];
return field_price;
}

I just sketched it out, I hope it's clear.

And well these example are only covering USER, I may imagine very complex sorting-key construction through COA and/or INT-types where the ordering is based on random or time-dependent calculations.

Actions #3

Updated by Alexander Opitz over 11 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)

As this report is very old, is the handling in newer TYPO3 CMS Versions (like 6.0/6.1) more like you expect it?

Actions #4

Updated by Alexander Opitz about 11 years ago

  • Status changed from Needs Feedback to Closed

No feedback for over 90 days.

Actions

Also available in: Atom PDF