2017 © Pedro Peláez
 

silverstripe-module silverstripe-namedlinkfield

A SilverStripe field type for having an internal or external link *with title*, in a single field with a nicely styled form. Based on the LinkField module by Simon Elvery & Left, Right Centre.

image

micschk/silverstripe-namedlinkfield

A SilverStripe field type for having an internal or external link *with title*, in a single field with a nicely styled form. Based on the LinkField module by Simon Elvery & Left, Right Centre.

  • Wednesday, June 29, 2016
  • by micschk
  • Repository
  • 1 Watchers
  • 7 Stars
  • 538 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 8 Versions
  • 2 % Grown

The README.md

A link field (with title) for SilverStripe

A single inline link field which allows users to set a title/name for the link, and select - a page + optional text-anchor from the site tree - a file from the assets dir - an e-mail address (mailto link) - define a custom URL to link to - or enter a shortcode, (*1)

Usage

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:, (*2)

'PageID': 'Text'
'PageAnchor': 'Text'
'FileID': 'Text'
'CustomURL': 'Text'
'Shortcode': 'Text'
'Title': 'Text'

Requirements

  • SilverStripe CMS 4.0 or greater
  • Dependentdropdownfield (for in-page text-anchor selection)

Screenshots

, (*3)

Pick page & text-anchor, file, e-mail or (external) URL. Fields will be auto-updated., (*4)

TODO

  • Check source-class-HtmlEditorField_Toolbar.html#_LinkForm for inline uploading of files etc
  • Make translatable/i18n

The Versions

29/06 2016

dev-master

9999999-dev https://github.com/micschk/silverstripe-namedlinkfield/

A SilverStripe field type for having an internal or external link *with title*, in a single field with a nicely styled form. Based on the LinkField module by Simon Elvery & Left, Right Centre.

  Sources   Download

The Requires

 

silverstripe field

29/06 2016

1.3.3

1.3.3.0 https://github.com/micschk/silverstripe-namedlinkfield/

A SilverStripe field type for having an internal or external link *with title*, in a single field with a nicely styled form. Based on the LinkField module by Simon Elvery & Left, Right Centre.

  Sources   Download

The Requires

 

silverstripe field

24/05 2016

1.3.2

1.3.2.0 https://github.com/micschk/silverstripe-namedlinkfield/

A SilverStripe field type for having an internal or external link *with title*, in a single field with a nicely styled form. Based on the LinkField module by Simon Elvery & Left, Right Centre.

  Sources   Download

The Requires

 

silverstripe field

18/05 2016

1.3.1

1.3.1.0 https://github.com/micschk/silverstripe-namedlinkfield/

A SilverStripe field type for having an internal or external link *with title*, in a single field with a nicely styled form. Based on the LinkField module by Simon Elvery & Left, Right Centre.

  Sources   Download

The Requires

 

silverstripe field

18/05 2016

1.3

1.3.0.0 https://github.com/micschk/silverstripe-namedlinkfield/

A SilverStripe field type for having an internal or external link *with title*, in a single field with a nicely styled form. Based on the LinkField module by Simon Elvery & Left, Right Centre.

  Sources   Download

The Requires

 

silverstripe field

04/05 2016

1.2

1.2.0.0 https://github.com/micschk/silverstripe-namedlinkfield/

A SilverStripe field type for having an internal or external link *with title*, in a single field with a nicely styled form. Based on the LinkField module by Simon Elvery & Left, Right Centre.

  Sources   Download

The Requires

 

silverstripe field

25/04 2016

1.1

1.1.0.0 https://github.com/micschk/silverstripe-namedlinkfield/

A SilverStripe field type for having an internal or external link *with title*, in a single field with a nicely styled form. Based on the LinkField module by Simon Elvery & Left, Right Centre.

  Sources   Download

The Requires

 

silverstripe field

07/04 2016

1.0

1.0.0.0 https://github.com/micschk/silverstripe-namedlinkfield/

A SilverStripe field type for having an internal or external link *with title*, in a single field with a nicely styled form. Based on the LinkField module by Simon Elvery & Left, Right Centre.

  Sources   Download

The Requires

 

silverstripe field