Gossamer Forum
Home : Products : DBMan : Customization :

last 5 records via SSI on homepage

Quote Reply
last 5 records via SSI on homepage
I thought there was a mod to display the last x number of records via SSI on your homepage, but I can't find it for the life of me. Does this mod exist, or if not, what would be the easiest way to do this?

Thanks very much.

Quote Reply
Re: last 5 records via SSI on homepage In reply to
The mod is listed in the Resource area (titled "What's New") - JPDeni included instructions for creating the ssi link in the mod.
http://www.jpdeni.com/dbman/Mods/whatsnew.txt

Quote Reply
Re: last 5 records via SSI on homepage In reply to
Thanks Karen,

Except how would I use that mod to show a specific number of records vs. records added during a specific number of days?

I want to show exactly 5 records, but somtimes I have 2 records added in one day and sometimes only one record added over 20 days...

Thanks again.

Quote Reply
Re: last 5 records via SSI on homepage In reply to
You could try adding &mh=5 (max hits) to the URL to limit the number of records. My mistake too ... the instructions aren't for an ssi include but just for a static link.

You'd need to complete the mod then create a sub for the ssi call including the fields you'd want to display. Then, call the sub using a similar path as the static link.

<A HREF="db.cgi?uid=default&db=default&listnew=1&view_records=1">What's New</A>

would become:
!--include virtual="/db.cgi?uid=default&db=default&listnew=1&ssi_view_records=1&mh=5" -->

Use the html_record or html_record_long as a "template" for creating your new sub.



Quote Reply
Re: last 5 records via SSI on homepage In reply to
LoisC has references to older threads in her FAQ's site http://webmagic.hypermart.net/dbman/files.htm#top This page has a listing titled "Latest Headlines (SSI)" that would probably give you some valuable info on creating this mod in your database.