[SOLVED] Is there a built in function for creating a slug?
Posted: Fri Jun 27, 2014 9:20 am
I'm putting together a module that inlcudes pretty URLs generated from an entry title. So if I have a entry called "About about earwigs" then I'd end up with something like:
/newmodule/13/12/all-about-earwigs
It occurs to me that we must do this kind of slug creation somewhere when we create aliases, but having skimmed through the api docs I couldn't see anything obvious.
It's not a big deal if not because it's only a few lines to create my own function, but hey, I like to reuse code if it's there.
/newmodule/13/12/all-about-earwigs
It occurs to me that we must do this kind of slug creation somewhere when we create aliases, but having skimmed through the api docs I couldn't see anything obvious.
It's not a big deal if not because it's only a few lines to create my own function, but hey, I like to reuse code if it's there.