Вроде так и делали (для старого tt_news).
Еще вариант использовать Select Pro.
ИМХО правильный экстеншен. Было очень приятно иметь дело с человеческим SQL, после TS :-)
-------------
Select pro (gst_selectpro) might be a solution. You can use a query
like this:
SELECT
tt_news.title, tt_news.datetime, tt_news.author, short, tt_news_cat.uid,
bodytext, category, image, tt_news.uid, tt_news_cat.title,
CASE type
WHEN 0 THEN
CONCAT('index.php?id=19&backPID=6&tt_news=', tt_news.uid)
WHEN 1 THEN
CONCAT('index.php?id=', tt_news.page)
WHEN 2 THEN
ext_url
END AS selectpro_pid
FROM tt_news, tt_news_cat
WHERE (NOT archivedate OR archivedate > UNIX_TIMESTAMP(NOW())) AND
(category = 2) AND
(tt_news.category = tt_news_cat.uid)
###WHEREADD###
ORDER BY datetime DESC
This query shows all items from news category 2. Use \"selectpro_pid\" in
the Select Pro Columndefinitions to make the correct hyperlinks
([col_linkcolname] field).
The page containing the content should have this code in the setup of
the template:
plugin.tx_gstselectpro_pi1 = USER
plugin.tx_gstselectpro_pi1 {
text_parseFunc {
6 < tt_content.text.20.parseFunc
}
}
This takes care of the formatting of bodytext.
---------------------
|