"Favorite block" add icons

Permalink
Hi! Please help me. Is it possible to add another icons for display in 'favorite block'? How to do that?

 
MrKDilkington replied on at Permalink Reply
MrKDilkington
antonovsky replied on at Permalink Reply
No. Sorry, i was wrong. I am mean 'Feature block' based on fontAwesome.
antonovsky replied on at Permalink Reply
I want to include my own icons in 'feature block'.
First I have to create a font with my icons.
What to do next?
Make my own block type from copy of 'feature block'?
Or is it possible to extend existing feature block type?
MrKDilkington replied on at Permalink Reply
MrKDilkington
I think you will probably want to make a copy of the Feature block.

The way the Feature block works is that it parses a Less file in getIconClasses(). The Less file it parses is called variables.less.

getIconClasses()
https://github.com/concrete5/concrete5/blob/develop/web/concrete/blo...

variables.less
https://github.com/concrete5/concrete5/blob/develop/web/concrete/css...

How will you be creating the icon font and will it have a variable file like Font Awesome?

How many icons will your font use?
antonovsky replied on at Permalink Reply
I don't know how to create icon font, but i think it is possible. It will have a variable file like font awesome.
I need 15-30 icons
MrKDilkington replied on at Permalink Reply
MrKDilkington
If you use a font generator that creates a variables file like Font Awesome, you could try copying the way the Feature block works.

Another option for 15-30 icons, is creating an array of class names in your controller instead.
antonovsky replied on at Permalink Reply
Is it possible to extend core feature block controller?
MrKDilkington replied on at Permalink Best Answer Reply
MrKDilkington
I am not positive this is correct, but you could try this:

custom_feature_controller.php
// namespace if in a package
// namespace Concrete\Package\CustomFeature\Block\CustomFeature;
// namespace if in application
// namespace Application\Block\CustomFeature;
class CustomFeatureController extends \Concrete\Block\Feature\Controller
{
    // class code
}
antonovsky replied on at Permalink Reply
Thank you very much!