?
avatar TLWebdesign
TLWebdesign
7 Apr 2017

A great addition to the new fields function would be the ability to assign a font-awesome icon to the field to replace the label.
A field where you could specify the icon like "fa-home" would suffice. Unfortunately i'm not smart enough to write code for this to be implemented.

Regards
Tom

avatar TLWebdesign TLWebdesign - open - 7 Apr 2017
avatar joomla-cms-bot joomla-cms-bot - labeled - 7 Apr 2017
avatar Bakual
Bakual - comment - 7 Apr 2017

Since we don't have "font-awesome" included in core, such a function wouldn't make much sense in core imho.
However using template overrides, it should be possible to do something like that for sure.

avatar TLWebdesign
TLWebdesign - comment - 7 Apr 2017

Is there an icon font that is included? I see iconmoon in the backend. With template overrides you mean the template view of the com_fields and use the "label" field as the value for the icon then?

avatar Bakual
Bakual - comment - 7 Apr 2017

IcoMoon is included, yes. (https://docs.joomla.org/J3.x:Joomla_Standard_Icomoon_Fonts)
However it is not supported by all frontend templates. It's mainly used in the backend by extension devs.

With template overrides I mean that the rendering uses a JLayout (https://github.com/joomla/joomla-cms/blob/staging/components/com_fields/layouts/field/render.php) which can be overriden by templates. In that override you could do whatever you like. Eg use the label value as a class attribute (or only if it starts with "icon-"). Or you could use the "render class" as label class. Whatever suits your needs.

avatar franz-wohlkoenig franz-wohlkoenig - change - 8 Apr 2017
Priority Medium Low
Status New Discussion
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 8 Apr 2017

@TLWebdesign should this Issue stay open?

avatar TLWebdesign
TLWebdesign - comment - 8 Apr 2017

No it shouldn't but i'm not familiar with the github etiquette ;)

avatar TLWebdesign TLWebdesign - change - 8 Apr 2017
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2017-04-08 08:29:55
Closed_By TLWebdesign
avatar TLWebdesign TLWebdesign - close - 8 Apr 2017

Add a Comment

Login with GitHub to post a comment