views:

68

answers:

2

News sites usually have a featured section and some category based news. The featured articles belong to a category but when they're featured they don't show up in the category section - what's the common way of doing this? Should I save a list of all the articles that are featured, then grab the latest news from each category, except prune out the ones that were pulled as the featured articles? Or is there another cleaner way of doing this?

Example:

FEATURED:

Michael Jordan and the bulls win Championship!

SPORTS:

Broncos win the superbowl!

The sports won't feature the featured article until it's no longer featured.

+1  A: 
  1. have a featured column
  2. featured_from and featured_to columns

The benefit of specifying a date span in option #2 means you don't have to manually change it over

OMG Ponies
+2  A: 

If the articles are specifically set to be feature articles you can just exclude them when selecting your section articles.

If they aren't specifically set and are randomlly selected each time the page is displayed you wil lneed to prune them out of the section article queries (NOT IN ... ) etc.

Michael Shimmins