Silverstripe Version: 4.13.0
Question: Can I (or should I) manage a “featured posts” list using ModelAdmin?
I would like to use ModelAdmin so that I have a central location to see and add/remove existing blog posts to a limited list of, say, 3 posts. I am using the Silverstripe Blog Module.
I’m familiar with adding a ModelAdmin page to add/edit/delete DataObjects, but here, I only want to be able to create a UI to exclusively select, using GridFieldAddExistingSearchButton, to identify up to 3 BlogPosts, and have that selection saved and retrievable from my templates.
I’ve gotten as far as adding BlogPost to $managed_models
private static $managed_models = [
But this only results in listing all the blog posts.
I realize I could add a “featured” checkbox to the BlogPost objects (and I have), but it has been a mess when many more posts than intended get this flag and I have to go looking for which ones have it… With ModelAdmin I thought I’d try this from the other direction and create a UI with 3 slots to fill. Then everything would be centralized and ONLY 3 posts would ever be featured.