Skip to content

Instantly share code, notes, and snippets.

@dljoseph
Forked from hubertusanton/gist:5900547
Last active August 29, 2015 14:07
Show Gist options
  • Save dljoseph/904d7375f1491d6cdfa1 to your computer and use it in GitHub Desktop.
Save dljoseph/904d7375f1491d6cdfa1 to your computer and use it in GitHub Desktop.
<?php
// nice internal / external link field
$fields->replaceField('LinkExteralOrInternal', (SelectionGroup::create(
"LinkExteralOrInternal",
array(
SelectionGroup_Item::create(
"external",
TextField::create(
"ExternalLink",
"Externe link"
),
'Externe link'
),
SelectionGroup_Item::create(
'internal',
TreeDropdownField::create(
"InternalLinkID",
"",
'SiteTree',
'ID',
'TreeTitle'
),
'Interne link'
)
)
)
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment