"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?
No. Sorry, i was wrong. I am mean 'Feature block' based on fontAwesome.
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?
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?
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?
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?
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
I need 15-30 icons
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.
Another option for 15-30 icons, is creating an array of class names in your controller instead.
Is it possible to extend core feature block controller?
I am not positive this is correct, but you could try this:
custom_feature_controller.php
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 }
Thank you very much!
Do you mean the Share this Page block or Social Links block?
https://www.concrete5.org/documentation/using-concrete5-7/in-page-ed...
https://www.concrete5.org/documentation/using-concrete5-7/in-page-ed...