Module Single Item URL Modification
When selecting a specific news item the url from the news list, the url for the news item is dynamically set to something like:
localhost:54372/.../2011/07/27/my-title
Is there a way to remove the date part of the url and simplify it to read something like?
localhost:54372/.../my-title
I would like to simplify the url for all modules if possible unless there is a SEO reason that the date is included or some other good reason? Thanks in advance.
Marc
Hi Marc,
You can set the urlFormat from the configuration.
You should add a new parameter to the NewsProvider - Go to Administration >> Settings >> Advanced and expand the News node
For Key enter "urlFormat". For value enter "/[UrlName]". All without the quotes.
Best wishes,
Ivan Dimitrov
the Telerik team
Thanks for the quick reply. I added the parameter with the suggested value, but the url still reads as:
localhost:54372/.../version-1
when the item is selected. I added the value underneath the following location:
Settings > Advanced > News > Providers > OpenAccessDataProvider > Parameters
I have the Key as urlFormat and the Value as /[UrlName]. I have also recycled the instance to make sure it wasn't caching. Thoughts?
Hello Marc,
The URLs for items are compiled/generated on each publish of an item. This means that once you edit the UrlFormat and restart the website you should perform a "dummy" edit on the item.
Regards,
Radoslav Georgiev
the Telerik team
Cool that got it working. Good to know thanks for the info guys.
Cheers,
Marc
Hi
I don't know why, but after I change the urlFormat, and dummy change all news, all the news links send to the news page as expected but the page shows a 404 error
http://[domain]/news/[newstitle] -> 404 error page
I tried to activate mutliple urls in both page and news but tha doesn't solve the problem.
Can you tell me why do I have this problem
PS: using version 4.4.2117 of sitefinity
Best regards
Hi Paulo,
I couldn't reproduce what you reported. Take a look at the attached images and verify that your settings are correct. Also, did you restart your application and republish news items after setting urlFormat?
All the best,
Jen Peleva
the Telerik team