Drupal 7 hook menu validating argument from url
Using this approach, a site editor will be able to configure what the URL path will look like.
We'll override the plugin so that it takes a string from the URL (slug), and then looks up the associated term ID.The only thing is that either we are not aware of it or we haven't used it before.When you want to validate a number with a predefined handler, you don’t have to add the validation function as it already exists.Now that everything is in place, we'll put our solution to the test. Once done, go to the page and edit the tags and give them nice URL slugs containing only English alphabet letters, numbers and dashes.For real projects, you might need to use a custom or contrib module to automatically generate slugs (see the machine_name module). The last step is to create and configure a View which will put everything together.