Skip to content

Add ability to save filters for authors that have common views #16735

Closed Answered by brandonkelly
JayBox325 asked this question in Ideas
Discussion options

You must be logged in to vote

You can create custom sources with predefined filters, from your dev environment (where allowAdminChanges is enabled). The caveat is that relations aren’t as easy, since elements are created per environment, not as part of the project config. So instead of choosing the related entry, you must enter its ID – or if the ID is going to be different depending on the environment, you can set it to an environment variable.

Alternatively, you could write a plugin that defines additional sources for each category using craft\base\element::EVENT_REGISTER_SOURCES:

use craft\base\Event;
use craft\elements\Entry;
use craft\events\RegisterElementSourcesEvent;

Event::on(
    Entry::class,
    Entry::EV…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by brandonkelly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants