Module Single Item URL Modification

Posted by Community Admin on 04-Aug-2018 14:24

Module Single Item URL Modification

All Replies

Posted by Community Admin on 01-Aug-2011 00:00

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 

Posted by Community Admin on 01-Aug-2011 00:00

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

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 01-Aug-2011 00:00

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?

Posted by Community Admin on 01-Aug-2011 00:00

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

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 01-Aug-2011 00:00

Cool that got it working.  Good to know thanks for the info guys. 

Cheers, 

Marc

Posted by Community Admin on 28-Jan-2012 00:00

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

Posted by Community Admin on 31-Jan-2012 00:00

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

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed