Download the PHP package bigfork/silverstripe-linkset without Composer
On this page you can find all versions of the php package bigfork/silverstripe-linkset. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download bigfork/silverstripe-linkset
More information about bigfork/silverstripe-linkset
Files in bigfork/silverstripe-linkset
Download bigfork/silverstripe-linkset
More information about bigfork/silverstripe-linkset
Files in bigfork/silverstripe-linkset
Vendor bigfork
Package silverstripe-linkset
Short Description Silverstripe module that allows for easy adding of links to the CMS
License BSD-3-Clause
Package silverstripe-linkset
Short Description Silverstripe module that allows for easy adding of links to the CMS
License BSD-3-Clause
Please rate this library. Is it a good library?
Informations about the package silverstripe-linkset
SilverStripe Linkset
Adds easy to implement link options to the CMS
Features
- Choose from the following options: None, Page, File, URL
- Option to remove fields that don't apply to your implementation
- Can output link straight to template
Installation
How to use
You will need to create a $has_one relation on your data object
Then add the LinksetField to your fieldlist
LinkSetField constructor accepts five params:
- DataObject $data - The object the relation is on $this
- string $name - Name of the field should match the relation key
- ?string $title (optional) - Title of the field, will set the heading above the fields
- array $fieldsToRemove (optional) - To remove Title from the list of fields pass in array for example ['Title']. Possible options to remove are:
- Title
- LinkType
- LinkURL
- LinkTarget
- LinkedPageID
- LinkedFile
- array $typesToRemove (optional) - Remove link types from the radio, to remove the option for None pass in array for example ['None']. Possible options to remove are:
- None
- Page
- File
- URL
With all the parameters your code may look like:
Using in templates
You can output the link in the template by calling the relation
This will output a simple anchor tag with the all the fields that had been set on the LinkSetField group.
Custom anchors can be done by accessing the fields through the relation as normal
All versions of silverstripe-linkset with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.1
silverstripe/framework Version ^5
bigfork/silverstripe-formtacular Version ^0
silverstripe/framework Version ^5
bigfork/silverstripe-formtacular Version ^0
The package bigfork/silverstripe-linkset contains the following files
Loading the files please wait ....