In my custom module I have passed parameter in URL like this:
<?php $currentUrl = Mage::helper('core/url')->getCurrentUrl(); ?>
<a href="<?php echo $currentUrl .'?alpha='. $letter ;?>"><?php echo $letter; ?></a>
The problem is that I have used this parameter to filter collection and the result is returned to the same page, everything is working fine. But from result page when another parameter is selected URL became like this:
www.mydomain/category.html?alpha=D?alpha=J
Is it possible to remove the duplicate parameters?
Note: need to remove only duplicates not the other parameters.
Best Answer
Instead of
getCurrentUrl()
you can use the special parameter_current
forgetUrl()
and then override the "alpha" parameter: