change link in gridview

Hello guys,

I need to change the link to the pagination in a grid view. The same applies to the links in the label that allow you to sort by. Is there a simple way?

Hi Ciro,

If I’ve understood your question correctly, you’re going to need to subclass CBasePager/CPagination and override this method: http://www.yiiframework.com/doc/api/1.1/CBasePager#createPageUrl-detail

in order to get the url to point where you’d like it to. I’m not sure if you meant to just change the text displayed by the URL.

For the sorting labels, you’ll want to subclass CSort, and override the link() method: http://www.yiiframework.com/doc/api/1.1/CSort#link-detail

Hope I understood your question right!

Hello,

thanks for the reply. Starting from your suggestions I was able to get the desired result.

Ascolta