Skip to content

Instantly share code, notes, and snippets.

@rotassator
Last active December 3, 2022 21:26
Show Gist options
  • Save rotassator/400af5f8e5a3b2e60c42 to your computer and use it in GitHub Desktop.
Save rotassator/400af5f8e5a3b2e60c42 to your computer and use it in GitHub Desktop.
SilverStripe: generate url segment from title string
<?php
// generate a url segment
$this->Slug = SiteTree::create()->generateURLSegment($this->Title);
@jrson83
Copy link

jrson83 commented Nov 23, 2021

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment