Here I want to know about the best practice first.
Assume we create a category using symfony2 sonata admin bundle then it creates the slug as well
e.g. Name: “My Category”
Slug: “my-category”
Now when I edit Category name to “My Category Edited” the slug becomes “my-category-edited”.
So first question
Is it good to change slug every time we edit something?
As that slug can be used to put a check say in some if() condition so changing the slug may break things.
My Second Question
How to avoid changing the slug on every edit? I am using Gedmo (http://gediminasm.org/article/sluggable-behavior-extension-for-doctrine-2)
Generally, it’s better to keep initial slug in order to avoid 404 not found error (if you use slug as a page identifier).
Check “Some other configuration options for slug annotation” paragraph in the manual that you provided.