Skip to content

Instantly share code, notes, and snippets.

@LostKobrakai
Last active July 26, 2016 12:27
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 LostKobrakai/5ace0b2082e9225b7596dceae0fab996 to your computer and use it in GitHub Desktop.
Save LostKobrakai/5ace0b2082e9225b7596dceae0fab996 to your computer and use it in GitHub Desktop.
Add urlSegments
<?php
class Migration_2015_10_21_12_13 extends Migration {
public static $description = "Add specific urlSegments to basic-page";
public function update() {
$t = $this->templates->get('basic-page');
$t->urlSegments(array(
'segment',
'segment2'
));
$t->save();
}
public function downgrade() {
$t = $this->templates->get('basic-page');
$t->urlSegments(true);
$t->save();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment