gorriecoe / silverstripe-linkicon
Adds an option to upload an icon to a link
Fund package maintenance!
Ko Fi
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:silverstripe-vendormodule
Requires
- gorriecoe/silverstripe-link: ^1.2.3
This package is auto-updated.
Last update: 2024-11-16 13:31:13 UTC
README
Adds an option to upload an icon to gorriecoe/silverstripe-link
Installation
Composer is the recommended way of installing SilverStripe modules.
composer require gorriecoe/silverstripe-linkicon
Requirements
- gorriecoe/silverstripe link ^1.2.3
Maintainers
Template
Add $Icon
to your Link.ss
file.
<% if LinkURL %>
<a{$IDAttr}{$ClassAttr} href="{$LinkURL}"{$TargetAttr}>
{$Icon}{$Title}
</a>
<% end_if %>
Options
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'