2017 © Pedro Peláez
 

silverstripe-module font-awesome

A simple form field for selecting font-awesome classes in the CMS.

image

moe/font-awesome

A simple form field for selecting font-awesome classes in the CMS.

  • Saturday, November 12, 2016
  • by peavers
  • Repository
  • 3 Watchers
  • 4 Stars
  • 1,314 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 1 Open issues
  • 8 Versions
  • 9 % Grown

The README.md

Synopsis

Provides a field to easily pick font-awesome icons, (*1)

Features

  • Easily pick icons to be used anywhere in the frontend
  • Can filter on icon name

Installation

Composer

Make sure you're not double loading the css/fonts with a theme., (*2)

Ideally composer will be used to install this module. composer require "moe/font-awesome:@stable", (*3)

Screen shots

Font awesome icon view

Font awesome icon

Filter view

Filter, (*4)

Usage

A basic working example, and the following to any class you want the field on;, (*5)

    private static $db = array(
        'Icon' => 'Varchar(255)',
    );

    public function getCMSFields()
    {
        $fields = parent::getCMSFields();

        $fields->addFieldsToTab('Root.Main', array(
           FontAwesomeField::create("Icon", "Font Awesome icon")
        ));

        return $fields;
    }

Then simple include in the template where you want the icon placed, (*6)

    <i class="fa $Icon"></i>  

The controller extension should make sure you've got access to the icons so you don't need to double up the CSS file., (*7)

Want colours instead of icons?

Got you covered, checkout color-swabs!, (*8)

Libraries used/modified

  • Font Awesome 4.7

The Versions

12/11 2016

dev-master

9999999-dev

A simple form field for selecting font-awesome classes in the CMS.

  Sources   Download

BSD-3-Clause

The Requires

 

by Chris Turner

font-awesome

12/11 2016

v1.1.3

1.1.3.0

A simple form field for selecting font-awesome classes in the CMS.

  Sources   Download

BSD-3-Clause

The Requires

 

by Chris Turner

font-awesome

05/08 2015

v1.1.2

1.1.2.0

A simple form field for selecting font-awesome classes in the CMS.

  Sources   Download

BSD-3-Clause

The Requires

 

by Chris Turner

font-awesome

28/07 2015

v1.1.1

1.1.1.0

A simple form field for selecting font-awesome classes in the CMS.

  Sources   Download

BSD-3-Clause

The Requires

 

by Chris Turner

font-awesome

28/07 2015

v1.1.0

1.1.0.0

A simple form field for selecting font-awesome classes in the CMS.

  Sources   Download

BSD-3-Clause

The Requires

 

by Chris Turner

font-awesome

12/06 2015

v1.0.5

1.0.5.0 https://github.com/peavers/silverstripe-font-awesome.git

A simple form field for selecting font-awesome classes in the CMS.

  Sources   Download

BSD-3-Clause

The Requires

 

by Chris Turner

silverstripe icons font-awesome

10/05 2015

v1.0.4

1.0.4.0

A simple form field for selecting font-awesome classes in the CMS.

  Sources   Download

BSD-3-Clause

The Requires

 

by Chris Turner

font-awesome

10/05 2015

v1.0.3

1.0.3.0

A simple form field for selecting font-awesome classes in the CMS.

  Sources   Download

BSD-3-Clause

The Requires

 

by Chris Turner

font-awesome