It is possible to check whether there is an item with the same title, but t you cannot set the url of the content. The urls is checked inside a data class CmsContentBase when the Nolics transaction is executed. There we call ContentUrlRewriterService which formats the url that goes to the database. Also, such a check will cause a performance impact when you have many items.
You could implement your own service that is called during binding a control populated with data from a given module. Another option is creating a custom module that will use your custom service.
The service is quite complex. You could implement your own service that inherits from UrlRewriterService
. The class provides base implementation for IUrlRewriterService
interface. You can override
GetUrlData method which is used by the cms to know if this url is content item , page etc.
GetItemUrl get an url, associated with a rewrite parameter. Here you need to get and modify the url
rewrite paramater - implement some properties that your item will use as - item ID, item Name. Here you could override ToString() - String, representing the internal state of the parameters
You have to create a custom class that inherits from UrlRewriteData. This class defines the data that is passed to the HttpContext.Items collection when the url was processed by the url rewrite service. In the constructor you could identify the item rewrite data in a redirected HttpContext.Current.Items.
Then your public control should inherit IUrlRewriterContainer interface and you need to implement the rewrite service.
#region IUrlRewriterContainer Members
/// Gets an instance of custom rewriting service
Then when you bind the data you could call the url rewrite service
var rewriteData = HttpContext.Current.Items[Constants.RewriteItemId] as CustomRewriteData;
var rewriteParam = rewriteData.Data as RewriteParameter;
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Public Issue Tracking
system and vote to affect the priority of the items