[TYPO3-dev] Lastupdate-List from tt_content?

Steffen Müller steffen at mail.kommwiss.fu-berlin.de
Sun Jun 25 19:52:34 CEST 2006


Hi.

On 20.06.2006 11:44 Sven Kalbhenn wrote:
> Hi all,
>  
> I need a Last-Update-List, not from the "pages"-table, but from the
> "tt_content"-table! 
> I want to use the "date"-field from tt_content to generate the list. 
> If the field is empty, it should not appear on the list.
>  
> How is this possible?
> Is there an extension? Or can I reconfigure one of the sitemaps (f.e.
> "recently updated pages")?
>  

I recently tried to find a single SQL statement to do that job for me. I 
almost did (see below) and the kickstart helped me to get a 
proof-of-concept extension, which does the frontend output.
The ext key is: sm_recentcontent
I just uploaded it to the repository, maybe you have to wait a day or so 
to find it in the rep. Feel free to share your ideas or help to make it 
a stable ext.

Two main features are missing:

- styling: TS + CSS and a fancy breadcrumb styled path menu (because 
sometimes the name of a page does not really tell enough about the page 
itself.)

My SQL approach was:

SELECT DISTINCT t.pid, p.title, p.subtitle FROM tt_content AS t, pages 
AS p WHERE t.pid = p.uid) AND t.deleted=0 AND t.hidden=0 ORDER BY 
t.tstamp DESC LIMIT 5

I had to fetch the tstamp with a second query, because DISTINCT will 
otherwise not work.

SELECT DISTINCT t.tstamp FROM tt_content AS t WHERE t.deleted=0 AND 
t.hidden=0 ORDER BY t.tstamp DESC LIMIT 5

Well, this may lead to inconsistency, if there was a change in the DB 
between those two queries. Any idea to solve that?


-- 
cheers,
Steffen




More information about the TYPO3-dev mailing list