A SilverStripe composite field for having various link types *with title*, in a single field with a nicely styled form.
A single inline link field which allows users to set a title/name for the link,
and select
use Restruct\SilverStripe\ORM\FieldType\NamedLinkField;
use Restruct\SilverStripe\Forms\NamedLinkFormField;
...
private static $db = array(
'NextAction' => 'NamedLinkField',
);
...
public function getCMSFields()
{
$fields = parent::getCMSFields();
$fields->insertBefore(
"Content",
NamedLinkFormField::create('ActionButton')
);
return $fields;
}
#Fix
Use Text fields instead of Varchars (workaround 'Row Size too large' MySQL error)
Restruct\SilverStripe\ORM\FieldType\NamedLinkField:
composite_db:
'PageID': 'Text'
'PageAnchor': 'Text'
'FileID': 'Text'
'CustomURL': 'Text'
'Shortcode': 'Text'
'Title': 'Text'
Pick page & text-anchor, file, e-mail or (external) URL. Fields will be auto-updated.
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