Take the 2-minute tour ×

I recently create a website (following the french tutorial http://www.siteduzero.com/tutoriel-3-517569-symfony2-un-tutoriel-pour-debuter-avec-le-framework-symfony2.html).

Now everything is OK but I don't know how to create/use permalink instead of using article id to access the article.

For instance, I have this :


Change to :


"my_article_title" is the title of the page which id is 105.

share|improve this question
Are your titles unique? you need some kind of unique element or combination of elements (like date and title) to do that, but then its jsut a matter of setting up rour routes to parse out those parameters and using them to select the article from the db. –  prodigitalson Jul 9 '12 at 13:03
add comment

1 Answer

up vote 1 down vote accepted

There's an explanation of using slugs in Symfony2 here: http://tutorial.symblog.co.uk/docs/customising-the-view-more-with-twig.html#slugifying-the-url

Without making the title slug unique, you'll need to use a url format like:


share|improve this answer
I follow Pappa's link et it works perfect ! Thanks ! –  Boun Jul 16 '12 at 16:20
add comment

Your Answer


