putyourlightson / craft-sift
Filters entries/categories/submissions that can be selected to only those that match a user's categories.
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 4
Forks: 1
Open Issues: 0
Type:craft-plugin
Requires
- craftcms/cms: ^3.0.0
This package is auto-updated.
Last update: 2024-11-04 17:52:19 UTC
README
A plugin for Craft CMS 3 that filters entries/categories/submissions that can be selected to only those that match a user's categories.
Requirements
Craft CMS 3.0.0 or later.
Installation
Install the plugin using composer.
composer require putyourlightson/craft-sift
Configuration
Copy the src/config.php
config file to craft/config
as sift.php
, adding the entry field handles and the associated user field handles.
return [ '*' => [ /** * The field handles to sift by for entry queries */ 'entryFieldHandles' => [ 'entryFieldHandleA' => 'userFieldHandleA', 'entryFieldHandleB' => 'userFieldHandleB', ], ], ];
Fieldtype
The plugin adds a Read-only Categories fieldtype that is visible to all users but that only admins can edit.
License
This plugin is licensed for free under the MIT License.
Created by PutYourLightsOn.