Developer forum

Forum » Feature requests » URL Replace in Form actions

URL Replace in Form actions

Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi,

 

Dynamicweb already does a URL replace for friendly urls automatically on the href attribute within the 'a' tags. My request is that it would do the same for the form actions, which is another part of the code where it's heavilly used.

 

Although we can use Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(), it would be useful for simpler and faster coding.

 

Best Regards,

Nuno Aguiar


Replies

 
Nicolai Pedersen
Reply

Why?

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Good question :)

 

We started doing this after analyzing some websites and wanted to reduce the number of redirects. Some of them existed because of form submits when we were submitting to "/Default.aspx?ID=3" and also in Google Analytics where some of those URLs were meaningless to our customers.

 

From that point on, we started to use Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl() anywhere DW did not account for (that includes stuff like a relative URL on a js variable for ajax calls for example).

 

Back to the original request, I know it's not possible nor reasonable to has DW to do the replace everywhere, so if it could do it on 'action' attributes on the 'form' element, would just make the templates a tiny bit cleaner :)

 

Nuno Aguiar