This behavior can create URLs that allow to return to a page by storing its GET Parameters on a stack.
The extension evolved from this forum discussion. Please add any comments or bug reports there.
Create an URL that contains all the GET parameter of the current page:
echo CHtml::link('A link', $this->createReturnableUrl('user/edit',array('id'=>124)) );
If you perform an action on the page
user/edit you can use this code to return to the originating page:
or create a link to the originating page in the
See the included demo for a more extensive example.
This project is hosted on github.