Main Stories
Slash Boxes

Slash Open Source Project

Slashcode Log In

Log In

[ Create a new account ]

Article Poll

Poll I found this article to be
Very Helpful
Not Helpful
Not Very Helpful
[ Results | Polls ]
Comments:0 | Votes:2

Finding the most recent post in a section?

posted by Krow on 07:59 AM May 30th, 2002   Printer-friendly   Email story
I've been trying to use the concept of Sections as my Slash site grows and users recommend new areas whose posts may not always be "front-page" material. I want to make sure these sections are easily noticed by new readers, so I've modified my header template to create a side-bar like the one on Slashdot, listing the sections and the date of the most recent story item. What I cannot figure out, short of editing the template by hand every time I post a new story, is how to quickly grab the date of the most recent story for each section for inclusion in this bar. Has anyone a neat trick to accomplish this?
This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login
Loading... please wait.
  • Last comments plugin []

    It creates a last-comments box for each section (including the index page, obviously).
    lottadot []
    • I apologize. Reading my submission again, I can see where there might be some confusion.

      What I want is to be able to dynamically update the date following the section link in my template when a new story item is posted to that section. Of course, multiple stories posted per day is not a problem, as I am only listing the date (and not time) of the last entry.

      So, the question becomes: How do you (easily) get the "time" for the most recent story in each section, for inclusion in the template? I know I cou


      -- [], proudly running Slash since 1/28/2002.