Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/riasvdv/statamic-position-fieldtype
Provide better UX to clients by letting them pick from icons.
https://github.com/riasvdv/statamic-position-fieldtype
Last synced: about 19 hours ago
JSON representation
Provide better UX to clients by letting them pick from icons.
- Host: GitHub
- URL: https://github.com/riasvdv/statamic-position-fieldtype
- Owner: riasvdv
- Created: 2019-04-17T09:25:09.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T02:19:34.000Z (over 1 year ago)
- Last Synced: 2024-09-14T07:12:46.313Z (18 days ago)
- Language: PHP
- Size: 1.58 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![Icon](icon.svg)
[![Latest Version](https://img.shields.io/github/release/riasvdv/statamic-position-fieldtype.svg?style=flat-square)](https://github.com/riasvdv/statamic-position-fieldtype/releases)
# Position Fieldtype plugin for Statamic
Provide better UX to clients by letting them pick from icons.
![Screenshot](./docs/img/position-fieldtype-screenshot.png)
## License
Position requires a license to be used while on a production site.
You can purchase one at https://statamic.com/marketplace/addons/position-fieldtype.You may use Position without a license while Statamic is in [Trial mode](https://docs.statamic.com/knowledge-base/trial-mode).
## Installation
Require it using Composer.
```
composer require rias/statamic-position-fieldtype
```Publish the assets:
```
php artisan vendor:publish --provider="Rias\PositionFieldtype\ServiceProvider"
```## Using the position fieldtype
Add the fieldtype to your fieldset. You can choose to hide certain positions, by default they are all visible.
```yaml
sections:
main:
display: Main
fields:
-
handle: position
field:
type: position
display: Position
left: true
center: true
right: true
full: true
drop-left: true
drop-right: false
default: right
```## Using Position
The output of the fieldtype is equal to the keys in the options array.
```twig
{{ position }} // center
```Brought to you by [Rias](https://rias.be)