Download the PHP package gorriecoe/silverstripe-linkfield without Composer
On this page you can find all versions of the php package gorriecoe/silverstripe-linkfield. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gorriecoe/silverstripe-linkfield
More information about gorriecoe/silverstripe-linkfield
Files in gorriecoe/silverstripe-linkfield
Package silverstripe-linkfield
Short Description Adds a Linkfield for gorriecoe/silverstripe-link
License BSD-3-Clause
Homepage http://github.com/gorriecoe/silverstripe-linkfield
Informations about the package silverstripe-linkfield
Silverstripe linkfield
Adds a Linkfield for gorriecoe/silverstripe-link
Why is this redirected from gorriecoe/linkfield?
The original maintainer of this repository has passed away. No changes are required and your module will continue to work as intended. Please see this issue for more info.
Installation
Composer is the recommended way of installing SilverStripe modules.
Requirements
- gorriecoe/silverstripe-link ^1.0
- silvershop/silverstripe-hasonefield 3.0.1. See Issue #11
- symbiote/silverstripe-gridfieldextensions 3.1
Maintainers
Screenshots
Usage
Configuration
By default all link types allowed in the Link model are displayed in the edit form, but this can be configured per-field, allowing multiple configurations without requiring multiple otherwise-identical Link model subclasses.
The Title field can also be hidden, which is useful if you intend on using the URL for a link but not the user-configured Title.
This configuration can be passed into the constructor, or set later using the LinkField::setLinkConfig()
method.
Declare only which link types are allowed.
Explicitly declare whether each type of link is allowed or not.
Hide the Title field
Setting the configuration later
Sort column
By default the LinkField assumes that the sort column is named Sort
. If you want to use another field name such as SortOrder
, you can specify it using the setSortColumn
method like so:
You can also globally define the sort column. In your config.yml add the following:
Belongs many many
We can also add a belongs_many_many relation to the Link class. In your config.yml add the following:
All versions of silverstripe-linkfield with dependencies
silvershop/silverstripe-hasonefield Version ^3.0 || ^4.0
symbiote/silverstripe-gridfieldextensions Version ^3.1 || ^4.0