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...