A
A
AleDv2015-04-02 16:10:10
Yii
AleDv, 2015-04-02 16:10:10

How to make CNC pagination in Yii1?

Hello. I'm learning Yii, I ran into a problem with setting up the CNC.
I wrote the following setting in the config:

'kvartiry-prodam'   =>'/category/index/id/apartamentsold',
 'kvartiry-prodam/<id:\d+>'=>'view/apartamentsold/',

To get links to the category site.ru/kvartiry-prodam and a link to a specific page site.ru/kvartiry-prodam?id=111 Question: how to configure the config so that pagination pages look like site.ru/kvartiry-prodam?page=2 ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Makarov, 2015-04-02
@SamDark

Approximately like this:

array(
    'defaultParams' => array('id' => 'apartmentsold'),
    'route' => 'category/index',
    'pattern' => 'kvartiry-prodam?page=<page>'
)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question