Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Url Rewriting for Custom ModuleUrl Rewriting for Custom Module
Previous
 
Next
New Post
5/29/2014 11:33 AM
 

Hi All,

I have recently been working on a couple of customized product display modules for a DNN 7.2 installation. It was originally decided that using Request Parameters to pass the Product ID/Product Type ID to the custom modules through the Url would be an acceptable solution when grabbing content from our database. 

Recently, after an SEO consultation, this requirement has changed. We now want to add keywords relating to the product into the Url when the module page is accessed. We have been trying to figure out a solution to this problem since.

We have two modules on two pages, one is a page accessed when a product category is selected, while the other is a page accessed when a product is selected fro the product category page.

Our modules currently accept Urls in the form

www.oursite.com/ProductTypePage/ProductTypeID/1

www.oursite.com/ProductTypePage/ProductPage/ProductTypeID/1/ProductID/2

where our SEO guys are looking for something more like

www.oursite.com/Laptops

www.oursite.com/Laptops/AcerLaptop

I'm pretty sure that we could come to a compromise along the lines of 

www.oursite.com/Laptops/AcerLaptop/ProductTypeID/1/ProductID/2

but I'm not entirely sure how to go about implementing this solution.

I know that we could create a page structure in DNN that would reflect the above URL structure and drop the module on each page (I.e. a Laptop page, a Desktop page, a keyboards page etc...) but unfortunately we have quite a lot of product types (not to mention products) so there would be a lot of manual labor in setting this up.

I've been looking at the iFinity Url Rewriter included in DNN 7. We could provide URL Rewriter Rules for each product type/product and redirect a single page holding our module, but this is a rather inflexible solution as a new rule would have to be added each time a Product Type or product is added to our database. 

I suppose we could add rules problematically when creating products but this just feels a little off.

Does anyone have any suggestions for a solution? Am I going to have to implement a custom URL Rewriting Provider to get around this?

Any help or suggestions would be greatly appreciated.

 

 
New Post
5/29/2014 11:42 AM
 
Well I did an experiment once and (IIRC) concluded that /Key/Value in the URL arrived in the QueryString as Key=Value, for as many Key/Values as you like!



Now this was a while ago and I have no docs to remind me, but I suggest you just test it and see what happens. Good luck and please report back.

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
New Post
5/29/2014 11:58 AM
 

Hi Richard, thanks for your reply.

Yes as far as I know the /Key/Value/ portion of the URL arrives as &key=value. This is why I thought that a compromise along the lines of 

www.oursite.com/Laptops/AcerLaptop/ProductTypeID/1/ProductID/2

 might work. The problem is that in our site page structure we would like to have a single page holding our module. We don't want to have to create a page for each product/product type as would be time-consuming and inflexible. 

So instead of having many pages like

www.oursite.com/Laptops/

www.oursite.com/Monitors/

www.oursite.com/Keyboards/

all displaying the same module we would like to have all of the above URLs showing the same single page. Is there a way of getting all of those above URLs showing a single page, while still retaining the URL?

Furthermore is there a way to keep the redirect list updated dynamically as new products/product types are added to our database?

 


 
New Post
5/29/2014 12:41 PM
 
Sorry - beyond my knowledge. I might start by asking why this would not be treated as Laptops=AcerLaptop. If that got answered it might explain the whole thing.

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
New Post
5/29/2014 4:43 PM
 

Hi,

DNN contain a url rewriter whitch is responsible for making friendly url for pages and transforming all module parameters to something like itemid/123. This is for the visible side of the url. The rewriter tranform all this to something like /Defaultt.aspx?tabid=123&itemid=123 This the job of a url rewriter.

If you want the url part generated by your module be user friendly (like you asking for). You have to create your url provider that can beadded to DNN url rewriter.

For more info :

http://www.dnnsoftware.com/wiki/page/...

http://www.dnnsoftware.com/blog/cid/1...

Alternativelly you can have a look at openurlrewriter.codeplex.com which try to make simplier to create module providers (and much more).

Regards,

Sacha

 

 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Url Rewriting for Custom ModuleUrl Rewriting for Custom Module


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out