"ORDER BY datetime DESC",
in the file ext_tables.php of tt_news to:
"default_sortby" => "ORDER BY datetime",

without having problems with my regular news on the page, wich uses the same
tt_news module?
Is this possible or is it better to copy the tt_news extension and build a
new tt_calender2 out of it?
Thanks.

Alex

PS: I don´t want to use the existing tt_calender Module.

Hope someone knows...

Regards

Jordan van Bergen
">

I hope an english question is no problem as this questions has been asked before and until now nobody knows the answer for this question first aked on 19-01-2003 16:44 by Alexander Hartmann, alex(AT)hsnewmedia.com
alexhartmann

Hi,

I would like to use the tt_news as a festival calender.

The Problem:
The latest festival in December is the first one in the list.
how can I set the sorting over TypoScript in

"default_sortby" => "ORDER BY datetime DESC",
in the file ext_tables.php of tt_news to:
"default_sortby" => "ORDER BY datetime",

without having problems with my regular news on the page, wich uses the same
tt_news module?
Is this possible or is it better to copy the tt_news extension and build a
new tt_calender2 out of it?
Thanks.

Alex

PS: I don´t want to use the existing tt_calender Module.

Hope someone knows...

Regards

Jordan van Bergen

c4x
2004-04-23 09:49
I can modify the tt_news extension a little...

1.) Open "pi/class.tx_ttnews.php" (Extension-Manager -> News -> Select "Edit files")

2.) Search for the line:

case "LATEST":

Replace it with:

case "NEXT":
case "LATEST":

3.) Repeat Step 2.) - the line exists twice.

4.) Search for

$selectConf["orderBy"] = "datetime DESC";

Replace it with:

$selectConf["orderBy"] = "datetime DESC";
if($theCode == ´NEXT´){
$selectConf["orderBy"] = "datetime ASC";
}

5.) Save the file

6.) Change the your CODE field from LATEST to NEXT


I don´t know if it works with the Archive or anything else, cause i don´t use them :)


Greets, mathias

Durchschnittliche Bewertung: 3 (1 Abstimmung)

Es ist möglich, diese FAQ zu kommentieren.