Slugs are awesome!

Slugs are totally rad! And not just the slimy little creatures that wreak havoc on your gardens!

I just finished implementing something new on my blog that changes the URLs to each post from the ugly, old, outdated ID numbers to a pretty, new, cool-looking slug.

It was actually quite easy to add through the use of the Doctrine Extensions Bundle's "Sluggable" feature. It basically adds a new property to your entities that can be dynamically generated from another property which the user sets (like article title, date, special codes, etc.). Basically it reads the title property of each blog post and shortens it, removes special characters, adds hyphens, and plugs it onto the url.

It's pretty cool stuff.

Anyway, thanks for reading and I hope you come back to check out how this blog and I are getting better every day!

- Bryce