• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
customized pagination using pagination class

#2
[eluser]georgeedwards[/eluser]
Not sure why you would NOT want to display something after editing it - because this surely counts as a delete?

But I do the following, in pagination situations where I need an edit/update facility (this is in the view):

Code:
<?php if ($items) : ?>
     <table>
          <tr><th>ID</th><th>Title</th><th>Options</th></tr>
          &lt;?php foreach ($items as $item) : ?&gt;
          
               <tr>
                    <td>&lt;?= $item['id'] ?&gt;</td><td>&lt;?= $item['title'] ?&gt;</td><td><a href="/controller/edit_action/&lt;?= $item['id'] ?&gt;" target="_BLANK">Edit</a></td>
               </tr>
          
          &lt;?php endforeach; ?&gt;
     </table>
&lt;?php endif; ?&gt;

This way then you can build an edit view that is called from the /controller/edit_action method, and accepts the ID of the item you wish to edit as URI segment 3.

_BLANK will obviously open this in a new window.

Does this help at all?


Messages In This Thread
customized pagination using pagination class - by El Forum - 08-18-2010, 04:20 AM
customized pagination using pagination class - by El Forum - 08-25-2010, 10:29 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.