How can I change the behavior of a button according to the URL? I have the following URL, eg:
site.com/search/ hill climbing machine
The button would be something to filter according to the price, being growing or decreasing .
Example with "DESC" decreasing (highest price)
URL:
site.com/search/ slope escalator ? filter = desc
The button being the one affixed to the URL:
<a href="site.com/search/maquina de subir ladeira?filter=asc">Filtrar por menor preço</a>
or, for increasing values:
Example with increasing ASC (lowest price)
site.com/search/ slope escalator ? filter = asc
<a href="site.com/search/maquina de subir ladeira?filter=desc">Filtrar por maior preço</a>
Being the default behavior (no filter? filter in the URL) "filter for less price"