RavatSinh Sisodiya
RavatSinh Sisodiya

Reputation: 1608

CakePHP 1.3 : Merge Two Model Pagination in single view?

I have two Model with no relationship between them i need to display it in single view file with cakephp Paging or Custom Paging.

Kindly help me...

Upvotes: 0

Views: 446

Answers (2)

Colby Guyer
Colby Guyer

Reputation: 594

Use import, http://book.cakephp.org/1.3/view/936/Importing-Controllers-Models-Components-Behaviors- and then you can do pagination on both. Note that I think you would have to do some sort of jquery/ajax pagination to have both work properly on a single page.

Upvotes: 0

Barry Chapman
Barry Chapman

Reputation: 6780

If I were you, create a view in mysql that is a UNION of the tables in question. Then create a model for that view and paginate that.

Probably the easiest way!

Upvotes: 1

Related Questions