I think you will find useful the following blog post where we provide more details about the custom url formats:
Custom URL Formats for Sitefinity Content Modules
The approach should be the same for the Products. In the Advanced
settings, the module is called Catalog
, there you will find the provider.
Here is also a sample which is based on the above blog post which you may find useful. The sample demonstrates how to achieve this by creating a custom provider for CatalogsModule (managing products). Please follow the below steps to register one:
1.Create a class inheriting OpenAccessCatalogDataprovider
and override the GetUrlFormat
like below, for the UrlFormat
use the names of the fields available for products surrounded by square braces "[..]", this is how the url will be constructed:
CustomOpenAccessCatalogDataProvider : OpenAccessCatalogDataProvider
Type itemType = item.GetType();
//the url format is controlled here
2. Go to Administration->Settings->Advanced->Catalog->Providers
and delete the currently existing provider.
3. Crete new provider
with the below settings:
Title: Default Ecommerce products
Description: The data provider for catalog module based on the Telerik OpenAccess ORM.
ProviderType: SitefinityWebApp.CustomOpenAccessCatalogDataProvider, SitefinityWebApp (change the type here to match the namespace of the project you work on).
Please save the changes.
4. Go to Parameters
for this new provider and add new parameter:
Please save the changes and after performing the above the products will use the new provider url format.
Please note all products need to be republished to use the new provider settings.
This will change the url for all products as well as the urls shown in search results.
Please note to test the above sample on a backup of your project and database
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 Sitefinity CMS Ideas&Feedback Portal
and vote to affect the priority of the items