https://github.com/putyourlightson/craft-sift
Sift plugin for Craft CMS 3.
https://github.com/putyourlightson/craft-sift
Last synced: 11 months ago
JSON representation
Sift plugin for Craft CMS 3.
- Host: GitHub
- URL: https://github.com/putyourlightson/craft-sift
- Owner: putyourlightson
- License: mit
- Created: 2019-11-27T11:58:00.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-04T08:27:13.000Z (almost 6 years ago)
- Last Synced: 2025-03-26T23:22:34.270Z (about 1 year ago)
- Language: PHP
- Homepage:
- Size: 20.5 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Sift Plugin for Craft CMS 3
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.
```php
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](https://putyourlightson.com/).