php - How to paginate multiple results in CakePHP? -
How can I use the Pageinization Assistant in KPHPH to set more than one result on the same page? They will do the page independently
Edit:
I have found a reason why it can not do this because because the page will get its URL from the assistant controller / verb and after that Finally add its parameters. If it pulls the URL from the address bar, it has its own unique variable and then a straw_rele is used to navigate to the next one if you have already placed the page, or if it is not present in it Now, I'm thinking of re-writing assistant to support this feature to support this feature, but I'm not sure if I need it or if they are already I support it and I am doing it wrong
Here's my solution in your controller:
function index () {// your default model is $ $ this- & gt; Set ('model1', $ this- & gt; paginated)); // Endorsement for Model 2- $ this- & gt; Set ('Model2', $ this- & gt; Paginated ('Model2')); }
In your view:
// display your model 1 data, and then the previous and next echo $ paginator-> Prev ($ options = array ('model' = & gt; 'model 1')); $ Paginator- & gt; Next echo ($ option = array ('model' => 'model1')); // Display your model2 data, and then the previous and next resonance $ paginator- & gt; Prev ($ options = array ('model' = & gt; 'Model2')); $ Paginator-> per second ($ options = array ('model' = & gt; 'Model2'));
This is the input to the Controller's PageGate method for the name of your model and the link for the Pageinator method (sort, pre, next).
Comments
Post a Comment