Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By slayerment on
I have an article that is around 2000 words long and was hoping I could split it up into 4 pages that each consist of 500 words. Is there some type of way I could dynamically add a "prev" and "next" link to the bottom of my articles without having to edit the actual page of each one. It would be pretty much like how it's handled on this site here. I have tried making book pages but that does not accomplish what I am looking for.
Does anybody have any ideas?
Thanks!
Comments
You can use the paging
You can use the paging module, but that requires you to set the pagebreaks manually.
I've thought about adding a way to make it do the pagebreaks automatically, but I worried a bit that it'd take more resources than it ought to.
-- Merlin
[Point the finger: Assign Blame!]
[Read my writing: ehalseymiles.com]
-- Merlin
[Read my writing: ehalseymiles.com]
[Read my Coding blog: Angry Donuts]
Thanks for the reply. Do you
Thanks for the reply. Do you know if that is how Drupal does it on this site?
Give me an example where you
Give me an example where you mean? Chances are it's via the book module, and each 'page' is a node.
-- Merlin
[Point the finger: Assign Blame!]
[Read my writing: ehalseymiles.com]
-- Merlin
[Read my writing: ehalseymiles.com]
[Read my Coding blog: Angry Donuts]
I agree that it is probably
I agree that it is probably done with nodes. I am just not sure how to dynamically do it rather than having to edit each node and hardcode the "prev" and "next" links. Something like on this page: http://drupal.org/node/11774
Thank you for your time!
Yea, that's all
Yea, that's all book.module
-- Merlin
[Point the finger: Assign Blame!]
[Read my writing: ehalseymiles.com]
-- Merlin
[Read my writing: ehalseymiles.com]
[Read my Coding blog: Angry Donuts]
I've used the book module
I've used the book module and tried doing something like this by parenting pages and all that but all it seems to do is list all the links at the bottom of the parent page. I can't find any way to link child pages together.
Am I missing something?
Thanks
If you have parent page A,
If you have parent page A, and pages B and C both are child pages of A, B and C will link to each other.
-- Merlin
[Point the finger: Assign Blame!]
[Read my writing: ehalseymiles.com]
-- Merlin
[Read my writing: ehalseymiles.com]
[Read my Coding blog: Angry Donuts]
To create something like the
To create something like the example you cited, enable book.module
Create content -> book page
Create a page that will 'hold' all of your pages, so to speak.
Then 'add child page'. Add page 1.
Then go back to that page, and 'add child page' again. Add page 2, and so on.
Alternatively, install paging.module
Create whatever node type you like, and use <!--pagebreak--> at every point you'd like to create a new page. It'll use Drupal's built in paging mechanism for the next/previous links, and tell you how many pages there are.
-- Merlin
[Point the finger: Assign Blame!]
[Read my writing: ehalseymiles.com]
-- Merlin
[Read my writing: ehalseymiles.com]
[Read my Coding blog: Angry Donuts]
Thanks for the reply.
Thanks for the reply.
I have installed the paging module and added
into my node but it gives me an error:
Fatal error: Call to undefined function: check_markup() in /homepages/1/d116186445/htdocs/site/modules/paging.module on line 53
Any ideas what's going on?
Thanks!
That error suggests you have
That error suggests you have the 4.7 version of the module in a 4.6 installation.
Be sure to grab the 4.6 version of the module (which admittedly isn't as good).
Actually, I should just backport the 4.7 version to 4.6 at some point. It shouldn't be that hard. But I haven't done that yet.
-- Merlin
[Point the finger: Assign Blame!]
[Read my writing: ehalseymiles.com]
-- Merlin
[Read my writing: ehalseymiles.com]
[Read my Coding blog: Angry Donuts]
It looks like both versions
It looks like both versions available for download are the same. They both look like they are for 4.7.
Any ideas?
Thanks again!
Oh man, I never tagged a 4.6
Oh man, I never tagged a 4.6 release!
I went ahead and backported it. a 4.6 release will show up on the next cron run; not sure when that is exactly.
-- Merlin
[Point the finger: Assign Blame!]
[Read my writing: ehalseymiles.com]
-- Merlin
[Read my writing: ehalseymiles.com]
[Read my Coding blog: Angry Donuts]
automatically paging
so is there a way to break a page automatically (word count or number of lines)?