homm / hommicons
Craft CMS Icon Picker
Installs: 622
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
Type:craft-plugin
Requires
- php: ^8.2
- ext-fileinfo: *
- ext-json: *
- craftcms/cms: ^5.0.0
README
Craft CMS Icon Picker
This plugin reads all images in the "icons" folder of your specified subvolumes. You should only upload SVG's in this folder!
Requirements
This plugin requires Craft CMS 4.x.
For the Craft CMS 3.x plugin version, see 0.x tags.
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require homm/hommicons
-
In the Control Panel, go to Settings → Plugins and click the “Install” button for HOMM Icons.
HOMM Icons Overview
This plugin reads all images in the "icons" folder of your specified subvolumes. You should only upload SVG's in this folder!
Configuring HOMM Icons
Go to Settings > HOMM Icons:
Here you can choose the desired assets volume which should be scanned.
Using HOMM Icons
- Go to Settings > Fields and choose the desired field.
- Within the Field Type choose HOMM Icons
- Upload your SVG icons in your
<VOLUME>/icons
folder
Basic usage in the template (Twig):
{{ svg('@webroot/images/icons/' ~ entry.icon ~ '.svg') }}
HOMM Icons Roadmap
Some things to do, and ideas for potential features:
- Add option to choose (an optional) subfolder
- Provide Craft Variable to easily output the icon
Brought to you by HOMM interactive