2

I made a custom node type with following fields:

  • Title
  • Body
  • Image (Unlimited)

I need to have a few pages from this content type and on each page I need to print the title field, the body and all images, but I need a pagination for the image field - lets say 9 images per page. (pagination only for one field in current node).

Is that possible without using Views, and using theming? For example, making a custom "field--field-images.tpl.php" template file, but instead of using the following code, printing the field with Pagination.

foreach ($items as $delta => $item): 
  print render($item);
endforeach;
1

You can use the CCK Pager project.

CCK Pager allows to page the item list of any CCK field with multiple values.

The module extends others CCK formatter by paging the field item list; setting the number of elements per page and pager type (full or mini) can be made per field. It only works with versions of CCK >= 6.x-2.5.

Look at this demonstration, and if you are using Drupal 7, follow the status of these issues.

  • Thank you for quick replay. Yes I am using Drupal 7 (sorry I didn't mention it). The Demonstration is exacly what I am looking for – Ivailo Milenkov Sep 14 '11 at 20:59
  • @Ivailo Milenkov: If this answer helped you, please mark it as correct by clicking the check mark beside the answer. – nmc Sep 15 '11 at 1:59
1

If you are looking for a solution compatible with Drupal 7, a good alternative to CCK Pager would be to embed a view that prints the paginated field content, as pointed out in this blog post.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.