Adds an option to upload an icon to gorriecoe/silverstripe-link
Composer is the recommended way of installing SilverStripe modules.
composer require gorriecoe/silverstripe-linkicon
Add $Icon
to your Link.ss
file.
<% if LinkURL %>
<a{$IDAttr}{$ClassAttr} href="{$LinkURL}"{$TargetAttr}>
{$Icon}{$Title}
</a>
<% end_if %>
Define folder to store the icons assets into.
gorriecoe\Link\Models\Link:
icon_asset_folder: 'SomeFolderName' // Defaults to 'Icons'
Defines tab to insert the icon_folder fields into.
gorriecoe\Link\Models\Link:
icon_tab: 'SomeTabName' // Defaults to 'Settings'
Defines the allowed file extensions for the icon field.
gorriecoe\Link\Models\Link:
icon_allowed_extensions:
- 'gif'
- 'jpeg'
- 'jpg'
- 'png'
- 'bmp'
- 'ico'
Module rating system helping users find modules that are well supported. For more on how the rating system works visit Module standards
Score not correct? Let us know there is a problem