most recent post from multiple categories?

Discuss news styles, css code, and other Coranto customizations in here...the possibilities are endless, so have at it!

Moderator: Spunkmeyer

most recent post from multiple categories?

Postby greenparrot » Fri Jul 08, 2005 4:30 pm

I'm starting to put together a site for the Association of Fire Investigation Dog Handlers http://www.fidogs.co.uk/temp/index.htm

I have set it up so that each handler has their own login and can only post to their own category. On the home page i would like to show the most recent headline from each handler, with a link to the full article. Can i achieve this with a profile? if so how?

Thanks

Roy
User avatar
greenparrot
 
Posts: 9
Joined: Sun Nov 10, 2002 1:50 pm

Postby InSAnE NiNjA » Fri Jul 08, 2005 6:05 pm

create a profile for most recent, highlight all the categories you wish to use
..nuttier then a squirrel turd..
User avatar
InSAnE NiNjA
 
Posts: 1213
Joined: Sat Jan 25, 2003 6:35 am

most recent post from multiple categories?

Postby greenparrot » Sat Jul 09, 2005 9:45 am

I created a profile called most_recent, but couldn't get it to display just the most recent post from each category. Is there a setting in the profile admin i should be using. Filter by number = 1, just displays 1 post, leaving blank returns all.

Thanks

Roy
User avatar
greenparrot
 
Posts: 9
Joined: Sun Nov 10, 2002 1:50 pm

Re: most recent post from multiple categories?

Postby Parahead » Sat Jul 09, 2005 10:55 am

greenparrot wrote:I created a profile called most_recent, but couldn't get it to display just the most recent post from each category. Is there a setting in the profile admin i should be using. Filter by number = 1, just displays 1 post, leaving blank returns all.
NiNjA's suggestion works if you whish to present the X number of freshest news independent on which category the news has been submitted to. I think that what you whish to do is present *one* fresh newsitem from each category, correct?

In order to do that you should leave the filter by number blank and place this small codesnippet at the top of your style that you use to create this freshest list:
Code: Select all
<PerlCode>
next PROFLOOP if($MostRecentNews{"$ProfileName-$Category"});
$MostRecentNews{"$ProfileName-$Category"} = 1;
</PerlCode>
Having the sort order the default would be essential, but you could also use the Sort Orders addon to sort by two fields, timestamp and then Category to get the order of the categories the same each time, if that is desirable of course.

Let us know how it works out...
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Thanks

Postby greenparrot » Sat Jul 09, 2005 12:09 pm

Thanks

That mod worked perfect. I have installed the sort addon but don't see a datestamp to sort by in drop down.

http://www.fidogs.co.uk/temp/index.shtml

Thanks
Roy
User avatar
greenparrot
 
Posts: 9
Joined: Sun Nov 10, 2002 1:50 pm

Re: Thanks

Postby Parahead » Sat Jul 09, 2005 12:55 pm

greenparrot wrote:Thanks

That mod worked perfect. I have installed the sort addon but don't see a datestamp to sort by in drop down.
Hmmm... You are quite right, I was so sure there was an option for timestamp that I didn't checked it out before posting. Is it a problem for you that you don't have it or can you live with only being able to sort by timestamp, not timestamp => category? Actually, come to think about it, you should be able to specify only Category, since the newsitems are sorted by timestamp in the newsdatabase, so that order would all ready be set. Try it out and let me know...
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden


Return to Customization

Who is online

Users browsing this forum: No registered users and 1 guest

cron