I have installed DataObjectManager and am storing Image, title, URL and Category. this resource is available on every page, so amended page.php with necesary code to create BannerResource Tab in CMS.
I am doing this for banners so I am setting the categories to Home, News, CaseStudies.
I would like that when I go to a case studies page in CMS and then click on BannerResources TAB then only the images which have been marked as CaseStudies for category will show up. I can do this once I have entered page as I have a drop down on the resources page created with
'Category', // The field we're filtering
'Filter by Category', // The label for the filter field
'Home' => 'Home',
'CaseStudies' => 'CaseStudies',
'News' => 'News',
'Portfolio' => 'Portfolio'
) // The dropdown map of values => display text. The values will be matched against the Author field.
But I want it to filter on load of page in CMS automatically. Does this make sense?
Can it be doen?