+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Custom URL for Dynamic Module

Custom URL for Dynamic Module

3 posts, 0 answered
  1. Alex
    Alex avatar
    1 posts
    Registered:
    18 Apr 2013
    10 Jul 2014
    Link to this post

    Hello,

    I created a dynamic module called NonTextAssets using the module builder. The default URL structure isn't working for us since there are some NTAs with the same title, only differentiated by the date published. So I need to include the PublishedDate in the URL to be able to access separate NTAs with same titles.

    I created my Custom Provider, called NTAProvider, uploaded the file to the server, but at the time of creating the new provider in advanced settings under "DynamicModules" it throws this error that I do not understand. It says: "The following required properties are not set: type"

    Here is the code for the new provider, and also a screenshot of the error:

    using Telerik.Sitefinity.DynamicModules.Data;
    using Telerik.Sitefinity.GenericContent.Model;
     
    namespace SitefinityWebApp
    {
        public class NTAProvider : OpenAccessDynamicModuleProvider
        {
            public override string GetUrlFormat(ILocatable item)
            {
                return "/[PublicationDate, {0:yyyy'/'MM'/'dd}]/[UrlName]";
            }
        }
    }

    Screenshot here

    Can some lend a hand here? I'm not sure where I'm supposed to set "type" ?

  2. Pavel Benov
    Pavel Benov avatar
    341 posts
    Registered:
    14 Mar 2016
    15 Jul 2014
    Link to this post
    Hello Alex,

    I was not able to reproduce this on my end. Looking at the screenshot I see that you are not providing the assembly in the type field. Try entering the following value there:

    SitefinityWebApp.NTAProviderSitefinityWebApp

    Make sure to recycle the application once the config change is successfully saved.

    Regards,
    Pavel Benov
    Telerik
     
    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
     
  3. Marco
    Marco avatar
    11 posts
    Registered:
    19 Mar 2015
    09 Jun 2015
    Link to this post
    Hi all,
    I followed the steps. The thing is when we preview the draft or unpublished blog it throws a 404.
    The Sitefinity URL query rules for preview no longer show. Is there a fix for this?
3 posts, 0 answered