Developer forum

Forum » Swift » Search url
Suzi Louring
Suzi Louring
Reply

Hi Swift team,

Swift 1.19

Template: Swift_SearchField.cshtml

The search result page does not have a pretty url and it's because of this parameter: redirect=false

What is it used for?

Example: 

With "redirect": http://skabertrang.swift.dynamicweb-cms.com/Default.aspx?ID=149&redirect=false&SearchLayout=field&q=bike

Without "redirect": http://skabertrang.swift.dynamicweb-cms.com/swift-b2c-demo-shop/products?SearchLayout=field&q=bike
 

/Suzi

 

 


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

It is there to prevent the redirect - which causes all searches to make 2 requests which is a small performance issue.

The solution is probably to change the js that handles this to be able to use the friendly url instead of the page id.

 
Suzi Louring
Suzi Louring
Reply

Ok, thanks.

And what about the parameter "SearchLayout"?
I can't see any difference in the search result whether it is with or without "SearchLayout" in the url.

 

You must be logged in to post in the forum