The pager should be added to $node->content as its own element during nodeapi('view'). Just use a high weight and it will float to the bottom. If you want to go the full mile, implement hook_content_extra_fields() from CCK so that the pager can be moved up and down using its UI. An example of this is in og.module - see og_content_extra_fields()
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | pagination-content.patch | 2.15 KB | agentrickard |
Comments
Comment #1
mundanity commentedHi there,
Thanks for the feedback. I thought about doing something similar, the issue was I didn't want this module to require anything else (even though I do realize CCK is fairly widely used). I'll look into an option for making it CCK aware in that sense.
Comment #2
psicomante commentedInteresting, thanks moshe weitzman for the tip, i patch the module until the feature will be included
+1.
Comment #3
agentrickardAttached is a quick patch (vs. svn diff) that moves the pager to $node->content['pagination'] with #weight of 50.
_Please_ run this entire module through Coder and follow proper coding conventions. Reading the code is painful.
Comment #4
mundanity commentedI've implemented partial support for
hook_node_extra_fields()in dev. If I can think of a decent way to display the pager/toc in form_alter() this functionality will be in the next 1.4 release. Thanks for your help!Comment #5
agentrickardYou need to use the cck weight function to determine the #weight of your form element.
Comment #6
mundanity commentedHi there,
The reason the code is not in form_alter() is due to appearance really, since the ToC and pager are not form elements, and just having a line saying "This is the pager" didn't really sit that well with me. I may just shove it in there after all to allow CCK to do it's UI fun stuff, but I'd like a bit more time to think on a better visual implementation if possible.
Comment #7
agentrickardRight, I'm just saying that it is not clear from the CCK docs that adding hook_node_extra_fields() is not sufficient. You also have to implement it at the form level, otherwise the CCK UI sort does nothing.
Comment #8
mundanity commentedHey there,
Yes you're right, I re-read what I put earlier and can see where it would be confusing. What I should have said is, the feature is not active yet, as it's waiting on a decision about the display while editing a node. Once I sort that out I'll finish that up and "enable" support for extra fields.