Change the url of the department filter widget - Ecommerce - Ecommerce - Progress Community

Change the url of the department filter widget


Change the url of the department filter widget

  • Change the url of the department filter widget
  • Hi all,

    I'd like to change the url, when using the Departments widget.
    Now I can filter on departments and the URL becomes like this:


    I want to have it like this:

    How can I achieve this?


  • 334767_sfv442117---product-url---rewrite-urls.PNG
    Hey Daniel,

    For products this is easy to do (Administration>>Catalog>>Providers>>OpenAccessProvider>>Parameters and then add a 'urlFormat' key and a value).

    For departments (which is a hierarchical taxonomy) you'd think adding the same parameter (under Administration>>Taxonomy>>Providers>>OpenAccessDataProvider>>... ) would do the same trick, but unfortunately not. Under Data>>URL Evaluators>>Taxonomy there's also a parameter section, but that's unfortunately undocumented - I did a blond attempt to verify, but no success.

    So it seems only a Custom Provider (as described in Slavo Ingilizov's post) might do the trick. However, this approach seems to clash with the standard pager control which results into PITS Issue #9577. (Update from Lubomir Velkov on Feb 2 2012: probl not make it for v5.0 release)

    I could be wrong because I've not created and tested the custom provider myself but for now it seems a no go all around.

    If you're going to do some coding, be aware of OpenAccessProvider vs OpenAccessDataProvider - has cost me a few hours in the past already :)

  • Hi there. I manged to do this by using IIS UrlRewrite 2.0. Added the following rule:
    <rule name="DepartmetnsRewrite" stopProcessing="true">
        <match url="^products/([^$]+)" />
        <action type="Rewrite" url="products/-in-Department/Departments/R:1" />
     And off course you have to do an outbound rule or change the navigation widgets to make the right urls for the client to click.

    See it in action here: 

  • Hello,

     The URL rewrite method is the preferred method to accomplish this task provided by Ole Christian Synnes and has been marked as the answer.

    Kind regards,
    Patrick Dunn
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  • Hi OC,

    your rewrite rule is working fine, thanks! I was wondering how you changed the URL's behind the departments widget. It's still pointing to the "-in-department/departments" url (off course).

  • Peter,
    I'm not using the Department widget at all. I have made my own from scratch.
    But I guess it would be just as easy to make an url-rewrite outbound rule that does it the other way around, as the inbound rule I pointed out above.
  • Hi OC,

    thanks, that explains it. I will see what solutions I will use.