Data Type that enables you to use your own website icon set in the backoffice.
V7 Version will no longer be maintained.
V8
Umbraco versions: 8.x.x
PM> Install Package BG.Icon.Picker.v8
V7
- Is no longer maintainedUmbraco versions: 7.4.0-7.15.x
PM> Install Package BG.Icon.Picker
NuGet
Create the data type
Location V8: Settings > Data Types > BG: Icon Picker
Location V7: Developer > Data Types > BG: Icon Picker
Umbraco Package Section
Configure the data type
Location V8: Settings > Data Types > BG: Icon Picker
Location V7: Developer > Data Types > BG: Icon Picker
Path to stylesheet: Stand-alone stylesheet for the icons is required.
/css/icons.min.css
Class name regex: It's recommended to not use "icon" as class identifier so it won't interfere with the umbraco icons.
(icn-[^:]*?):before
The icon picker returns a string with the icon name so it's really simple to work with.
V8
<i class="@(Model.Value<string>("icon"))"></i>
V7
<i class="@(Model.Content.GetPropertyValue<string>("icon"))"></i>
Matthew-wise wrote up a converter for ModelsBuilder.
[PropertyValueType(typeof(string))]
public class BgIconPickerValueConverter : PropertyValueConverterBase
{
public override bool IsConverter(PublishedPropertyType propertyType)
{
return propertyType.PropertyEditorAlias.Equals("bgIconPicker");
}
}