Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 6 of 6

Thread: URL Rewriting

  1. #1
    jdudley is offline Member
    Join Date
    Oct 2007
    Posts
    54

    Default URL Rewriting

    I would like to implement some custom url rewriting where the url shows the tree structure like this

    Section 1
    Section 1-1
    Section 1-2
    Section 1-3
    Section 1-3-1

    so if i am on the page Section 1-3-1 the url would include section 1 - Section 1-3 - Section 1-3-1.aspx anyone have a clue on how to do this?

  2. #2
    Dusty is offline Member
    Join Date
    Jun 2009
    Posts
    176

    Default

    I'm not entirely sure that I'm following what you mean by by the URL showing the tree structure, as URLs are single path navigation objects. It sounds more like you're going for an intrinsic breadcrumb the propagates the nodes 'up the tree' so to speak. If that's what you're going for your best approach would be to navigation control capable of parsing it's current navigation context and creating your links for that context.

    Hope that helps,

    Dusty
    ASPDotNetStorefront Staff

  3. #3
    jdudley is offline Member
    Join Date
    Oct 2007
    Posts
    54

    Default

    I guess the best way to describe this is using the site

    if you goto this site
    http://www.thesurfboardwarehouse.com/

    then in the navigation menu goto Products -> Surfboard Fins ->FCS Fins -> Hot and New


    if you click that menu item the url is s-137-hot-and-new.aspx

    by reading the url you would never guess this page has fins on it. So what I would like to do is make the url say surfboard-fins-FCS-fins-hot-and-new.aspx or surfboard-fins/FCS-fins/hot-and-new.aspx. This way I get the extra keywords in the url.

  4. #4
    blindreality is offline Junior Member
    Join Date
    Oct 2009
    Posts
    2

    Default

    What I would be more concerned about would be that the page title doesn't contain the keywords you are looking for. If I bookmark your page all it would tell me is your store name (good) and hot and new (bad). I might assume that it is the hot and new list for the entire store rather than just one category.

  5. #5
    jdudley is offline Member
    Join Date
    Oct 2007
    Posts
    54

    Default

    Well, the page title is the easy part and can be changed in the admin. I am just seeking help with the url rewrites.

  6. #6
    MarkC is offline Developer
    Join Date
    Aug 2006
    Posts
    166

    Default

    Mods would include:
    1. Modifying the AspDotNetStorefrontCore/SE.cs/MakeEntityLink to generate hierarchycal url structure. Currently it only accepts the current section's id and SE name, if you want to stuff another one, you'll need to add the extra parameter(provided you're only concerned with redundant section SE names)

    2. Modify the <urlrewrites> section on web.config to map the incoming url pattern. Keep in mind that the {Section}ID is the required querystring parameter in order to lookup the owning entity.

    3. Modify {web}/App_Code/ShowEntityPage.cs to remove 301 redirects(if needed).

    If what you only want to achieve is offer redundant SE names, you may only need to do step 1.