[TYPO3-english] Complex Query in Typoscript

IAmThatSTrange mtj66383 at creighton.edu
Tue Feb 22 21:23:17 CET 2011


Hi all, I've been looking all over for information on how to do this in
Typoscript. tsref while great doesn't go into the detail for me to
understand where to dot the i's and cross the t's.  (syntax, usage)

What I'm trying to do is show the last 5 updated content element headers as
links to those content elements on the home page (from several pages down -
on as many subpages as necessary to get those content elemetns).
So
Home page (where the links to the content elements will be shown) 
        News
               Feb 2011
                    021811 (where the content elements are)
                    021611 (where the content elements are)
                    021411 (where the content elements are)

I only need the most recent 5 or 6 but if one page has only 3 content
elements, then the top 3 content elements from the next page should show.

I have a query that get's exactly what I want in a straight db query, I've
just no clue how to put this into Typoscript.

the Query:

SELECT t.uid, t.pid, bodytext
FROM tt_content t
WHERE pid IN (SELECT p1.uid FROM pages p1 LEFT JOIN pages p2 ON p1.pid =
p2.uid where p2.pid = 17523 and p1.hidden = 0 and p1.deleted=0)
order by tstamp desc

Can anyone assist?

Thanks so much!

M
-- 
View this message in context: http://old.nabble.com/Complex-Query-in-Typoscript-tp30989277p30989277.html
Sent from the TYPO3 English mailing list archive at Nabble.com.



More information about the TYPO3-english mailing list