thisisbd / silverstripe-fontawesome-iconpickerfield
Font Awesome Icon Picker for SilverStripe 3.1.x based on http://mjolnic.com/fontawesome-iconpicker
Installs: 3 257
Dependents: 1
Suggesters: 1
Security: 0
Stars: 13
Watchers: 5
Forks: 9
Type:silverstripe-module
Requires
- silverstripe/cms: ~3.1
- silverstripe/framework: ~3.1
This package is not auto-updated.
Last update: 2024-12-16 13:22:55 UTC
README
Font Awesome Icon Picker for SilverStripe 3.x based on http://mjolnic.com/fontawesome-iconpicker
<iframe title="SilverStripe Font Awesome Icon Picker Field" width="420" height="315" src="https://www.youtube.com/embed/DwJhmhc9PRw" frameborder="0" allowfullscreen></iframe>Maintainer Contacts
- Darren-Lee Joseph
<darrenleejoseph (at) gmail (dot) com>
Requirements
- SilverStripe 3.1
Installation Instructions
Installation can be done either by composer or by manually downloading a release.
Via composer (best practice)
composer require "thisisbd/silverstripe-fontawesome-iconpickerfield:*"
Manually
- Download the module from the releases page.
- Extract the file (if you are on windows try 7-zip for extracting tar.gz files
- Make sure the folder after being extracted is named 'fontawesome-iconpickerfield'
- Place this directory in your sites root directory. This is the one with framework and cms in it.
- Visit
<yoursite.com>/?flush
to clear the manifest cache.
Usage Overview
private static $db = array(
'FontAwesomeIcon' => 'Varchar'
);
In getCMSFields
do this or something similar:
public function getCMSFields()
{
$fields = parent::getCMSFields();
$fields->addFieldToTab(
'Root.Main',
FontAwesomeIconPickerField::create('FontAwesomeIcon', 'Font Awesome Icon')
);
return $fields;
}
Frontend implementation
Suggested is to always use the latest version of FontAwesome, as the module tries to get all the available icons from the FontAwesome YML file on Github.
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css"/>
Known Issues
No known issues.