-
☆ A M B ☆
- 455 Posts
using &sortBy=`publishedon DESC` will sort them well. Why don’t you use it?
Thank you very much for your suggestion, AHHP, but the problem is that I have to enter also old articles articles (from 2006) on this website, i.e. I need to have my "own" publication dates. This explains why I have the TV for "dateArticle".
Any idea how I could solve this problem ?
-
☆ A M B ☆
- 455 Posts
This parameter needs a database column with a comparable value such as integer.
If you enter the dates like a number (e.g. 20090523 as 2009/05/23) or timestamp, MySQL see the value as a big number and can compare it but it can not compare something like this "2 2009" with "3 2009". MySQL see them as string!
Thanks a lot ! Maybe this will help me, but since I am rather a beginner, I have to ask you more questions.
Does it mean that I have to add a database column to the template variable ? And to add an integer (which one) to this new column ? Do I have to modify the Ditto call and the Dito template chunk ?
-
☆ A M B ☆
- 455 Posts
The TV is db column you need.
Ditto wants to compare your TV value but value is not comparable (i said before)
So just enter a comparable value in this TV.
Thank you !
I guess I understood now the principle.
I changed now in the Template Variable, the "Input type" to "Number" and enter the dates in the format 20061230 as you suggested. But it does not seem to work either.
What to do ? Did I make perhaps a mistake in my coding ?
Still no answer from anybody ?