I saw back in http://drupal.org/node/79130 that support was added for paging with CCK, but I can't really figure out what that means, in particular I don't know if it is supported within cck fields (text fields) or what if anything I can do in my node type theme template to enable it.

My nodes don't have a standard body field, but in this case have a number of text fields: summary, history, and description. The description can get pretty long and so I'd like to be able to add paging to this node type, but installing the Paging module, setting it up per the instructions (enabling it in the appropriate filter and for this node type), and inserting the paging tag

does nothing. I'm not using TinyMCE as some of the other issues brought up.

How does paging work with cck? Is there something I need to insert into my template to make this work? I am using a custom node-nodetype.tpl.php to theme this nodetype.

thanks!

Comments

Gurpartap Singh’s picture

Status: Active » Fixed

Paging supports only the "body" field of CCK content types. That means it doesn't support textfields with more than 1 row. If you need to page your textfield(probably only 1 of them), it's suggestive to make the default "body" field your "Description field". You can set this on the main page of set-up of your content type, just below where you set the name of "Title" field.

Hope this helps.

pcdonohue’s picture

Thanks for the explanation, I wasn't using the body field due to some challenges with theming it (I followed the recommendation of removing the body field in http://drupal.org/node/145643).

The functionality I was looking for though is more along the lines of what was discussed in http://drupal.org/node/121245

Adding paging support to a CCK node would mean knowing how to split the various fields into pages, which would probably have to be handled in a custom node.tpl.ph for that node type, but things definitely get a bit tricky. You would have to decide what was shown on every page and what was page specific. Of course, we could have a helper function for the node template that takes a CCK Text Field with Paging module pagebreaks along with a page number and then returns the appropriate content for that page. This works if only one CCK Text Field is using paging.

If we want to allow multiple text fields to include pagebreaks, it gets a lot crazier, as how do you render the page and where do the page breaks occur, especially when some is trying to use their own theming? That one I haven't thought through particularly well.

Any ways, thanks for the help. I decided to use the book hierarchy and add child pages to the node instead of using paging.

Anonymous’s picture

Status: Fixed » Closed (fixed)