Skip to content

Instantly share code, notes, and snippets.

@Liongold
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Liongold/eda3a016778fc1bc0ab0 to your computer and use it in GitHub Desktop.
Save Liongold/eda3a016778fc1bc0ab0 to your computer and use it in GitHub Desktop.
A part of the implementation of Redirect in new tab feature in SilverStripe (code change)
<?php
class RedirectorInNewTab extends DataExtension {
private static $db = array(
"OpenInNewTab" => "Boolean"
);
public function updateCMSFields(FieldList $fields) {
$fields->addFieldToTab("Root.Main", new CheckboxField("OpenInNewTab", "Open in new tab"));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment