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

Forums / Developing with Sitefinity / URL Masking for dynamic pages

URL Masking for dynamic pages

4 posts, 0 answered
  1. whibs
    whibs avatar
    2 posts
    Registered:
    08 Sep 2012
    16 Apr 2008
    Link to this post

    Hi,

    I am looking at Sitefinity as a possible CMS for an existing site. I am trying to determine how much time and effort it is going to take to convert my current functionality into Sitefinity framework. My main concern right now is how I can mask the URL of a dynamic page. For example, if I have a list of products I want to be able to do this:

    Actual URL: www.site.com/prodCategory?id =383&prodName=bikes
    Desired URL: www.site.com/bikes.html

    I would also like to be able to modify the breadcrumb navigation to reflect the masking too.
    EG: home > bikes

    Can anyone point me to some documentation that would explain how I would go about doing that?

    Thanks,

    Mike

  2. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    18 Apr 2008
    Link to this post
    Hi Mike,

    You could achieve this using the URL rewritting option and "mask" pages using URL rules. You could refer to the Sitefinity User Manual -> The Application's web.config file, section URL Rewriting for more information about it.

    As for the breadcrumbs, our breadcrumb control shows the page name specified in the Administrative Part of the CMS.

    Don't hesitate to contact us if you have other questions.

    Kind regards,
    Georgi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. whibs
    whibs avatar
    2 posts
    Registered:
    08 Sep 2012
    13 May 2008
    Link to this post
    Thanks for the information.

    Does this mean it is not possible to change breadcrumb navigation control properties at runtime?  I would like to be able to have the breadcrumb appear as:
    home > products > bikes

    instead of:
    home > products > item

    Mike
  4. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    16 May 2008
    Link to this post
    Hello Mike,

    You would be able to have such breadcrumb navigation if you have a page structure similar to the one showed in the attached screenshot and url rewrite rules as follows:
        <urlrewrites> 
          <rule> 
            <url>/urlrewrite/home/products/item(.*)\.aspx</url> 
            <rewrite>/urlrewrite/home/products/bikes.aspx?ShowItem=$1</rewrite> 
          </rule> 
        </urlrewrites> 

    This way, if you access items page, the path will be rewritten and you will actually see the bikes pages. The breadcrumb's last node is the actual page that you are looking at. You cannot change breadcrumb's Starting node at runtime with the built-in functionality. This control inherits the ASP.NET breadcrumb control, and take the path from the current context. If you manage to override our control, you could specify which starting node  to use, so it can show custom navigation.

    All the best,
    Georgi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Register for webinar
4 posts, 0 answered