Pagination

Zyxware default image2
| 3 min read
The default behavior of drupal_redirect_form in Drupal 6 is to redirect the user to $_GET['q'] when an explicit redirect location is not set in $form_state['redirect']. So any form submission from a Drupal page with additional querystrings like in a paginated form (for example admin content listing forms or admin comment listing forms) will result in the querystrings being lost. This can be frustrating when you administer content from such forms as you have to click the pager link and go back to the previous page after form submission. This can easily be fixed by adding a submit handler for the form in question and setting form_state redirect correctly.
Zyxware default image2
| 3 min read
Blocks are regions on a Drupal website that show small but significant pieces of content. Blocks are an important component from the perspective of a Drupal website. Blocks are usually assigned to regions in a page and they are supposed to be printed on a page. However there are many instances where you might want to print a block within a content. It is not directly possible to assign a block to a region within content (node in Drupal speak) as you can do with a page. But as with everything in Drupal there is a way to do that.
Zyxware default image3
| 5 min read
When retrieving large number of records from a database table it becomes essential to do some kind of pagination while presenting the data to the end user. There are two ways of doing this. One is a server side implementation and another is a client side implementation. Here we are presenting a completely dynamic server side pagination implementation where the client only has to tell the server the number of records the server has to return and the starting record number.