I've been tasked with creating a front (home) page that will feature a single top story (feature area) that could be one of several different content types: an article, a standalone video or a standalone slideshow. This area may have content that remains in place while other stories, chronologically listed, come and go below it.
I was planning to create/modify custom content types for article, video and slideshow using CCK and to use Views to find which specific item is designated as the top story for display. Site editors will somehow designate which particular node will be the top story. My question is: how do I make the selected top story node the exclusive top story so that it "unflags" former top stories as top stories? I hope that makes sense.
My initial thoughts were:
1. Add a "top story" checkbox to each of entry forms for each of the three content types in question. When the checkbox is checked, there is some kind of Ajax call that alerts the editor "this will replace 'story such and such' as the top story, do you want to proceed?" And then when the node is saved/created, it will set the former node to 0, false or whatever for "top_story." Problem is I have no idea how to do that.
2. Create a "top story" content type. Editors would have to go to an entry form for the "Top Story" content type and then select an existing article, video or slideshow node to assign to it. Problems: it creates an extra step for the editors; I still have to deal with old nodes of the "top story" type somehow. Is it possible to run a script upon saving a new "Top Story" node that would unpublish all former ones?
Any thoughts would be greatly appreciated. I'm a bit of a newbie so if there's some obvious solution I'm missing feel free to point me in the right direction. Thanks!
Mike L.
Comments
Nodequeue
Have you considered the Nodequeue module? That is essentially what it is made to do. The item(s) at the top of the queue are what shows... no need to toggle the other content off, as only one shows (if you either set the Nodequeue to 1 item, or alternately more items but limit the View to display only the 1 item). You can reorder the nodes in your queue(s) however you prefer.
Nodequeue
David,
This looks like it might just do the trick. I'll check it out. Thank you! I never would have known such a module existed.
Mike