Download the PHP package briceburg/silverstripe-flexilink without Composer
On this page you can find all versions of the php package briceburg/silverstripe-flexilink. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download briceburg/silverstripe-flexilink
More information about briceburg/silverstripe-flexilink
Files in briceburg/silverstripe-flexilink
Package silverstripe-flexilink
Short Description Link to SiteTree Pages, External URLs, YouTube Videos, &c. from a single, flexible SilverStripe field.
License BSD-3-Clause
Homepage https://github.com/briceburg/silverstripe-flexilink
Informations about the package silverstripe-flexilink
silverstripe-flexilink
Link to SiteTree Pages, External URLs, YouTube Videos, &c. from a single, flexible SilverStripe field.
Requirements
SilverStripe 3+
Screenshots
See silverstripe-flexichoice for a similar text input field.
Usage
- Add
FlexiLink
field types to yourDataObject
(s)
Trigger the environment builder (/dev/build) after extending objects --
You will now see the FlexiLinkField
appear in the CMS when editing your
object.
-
FlexiLink
provides the following public template methods- Type : The type of link (e.g. 'ExternalURL','Page','YouTubeID')
- Value : The raw value of the link
- URL : The link transformed into a URL (E.g. Page->Link(), 'http://www.google.com/', '//www.youtube.com/embed/[Value]')
- You may define link selection types and their related fields in YAML Configuration. Here's an example /mysite/config/_config.yml
This example adds a custom 'Google' field type, and limits the dropdown selection to 'Page' and 'Google' (hides the built-in YouTubeID and ExternalURL).
Remember, ?flush=all after YML configuration changes to register them in the manifest.