Project:Table of Contents
Version:6.x-3.x-dev
Component:Miscellaneous
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Creating TOC that support paging content (http://drupal.org/project/paging)
Is there any chance to create TOC across the page?
Cause it's great and simple way to create multi page content than using a book module :D

first page here.
Heading 1

Heading 2
second page here.

Comments

#1

Yes, Joomla paging TOC is much more better,... simple and easy,.. how can we get there?? :(

#2

Priority:critical» normal

critical feature requests are an oxymoron.
However it's a good request.

#3

Version:6.x-2.2» 6.x-2.x-dev

Also, features should target the -dev release for pretty much every Drupal project :)

I've never used Joomla, or the paging module, but I have an idea of what you're looking for. Could we perhaps get a specific set of features as to what this would do? Something that we can say "when these are done, this feature is complete".

One worry I have is that paging appears to only be for D5. Any solution should work with both D5 and D6. Is there a different way of doing paging in D6, either in core or with a different module?

Thanks,
--Andrew

#4

There's already a ported version of paging for D6, and it's great when this two module can work together

thanks

#5

Pagination Module :

http://drupal.org/project/pagination
http://drupal.org/project/paging

And TOC / Table of Contents
http://drupal.org/project/tableofcontents

For the navigation and page breaking Option (And TOC is floating on every page for navigation).

#6

Version:6.x-2.x-dev» 6.x-3.x-dev
Assigned to:panji» Anonymous

Hi Panji,

Are you still using TOC? If so, can you try with the newer version and use the automatic feature? That should add a new TOC for each page. Is that what you want or do you want one TOC on the first page to link to any one page?!

Thank you.
Alexis

#7

Hi Alexis,
Different users will have different needs, I would prefer to have a single index on the first page only. I have tried release 3.1 and 3.x-dev (and tried each paging module independently) but can't get a satisfactory solution. It works correct for entries on the same page as the TOC, but not for links outside of this first page.
Is it possible with the current state of the TOC module?
regards,
Michel

#8

Michel,

It looks like it would be relatively easy with the Paging module since that works on a single node. We would need to ask the Paging module to run the TOC filter before it breaks up the pages. That should be easy enough to do and it would give you the table where you want it (i.e. where you put the [toc] tag.)

Thank you.
Alexis

#9

Thank you for your reply, unfortunately my paid job has kept me busy for the last few days and I haven't been ably to try any further.
Your explanation makes perfect sense and has encouraged me to try again when I have some time.

#10

Hi Alexis et al.,

I have installed the Paging module on my system and everything works fine. The only thing I would like to change is to have a full TOC at the top of each page. As of now - the TOC links to the topics contained on the current page only.
How to do that?

Thanks,

Margaret

#11

Margaret,

Is the page module cutting pages automatically, or do you have to enter a tag? I checked that out once a very long time ago but am not using that capability at the moment.

Thank you.
Alexis

#12

Hi Alexis,

The short answer is yes - we had to add [toc list: ul;] at the top of each "broken" page.

More info below.

Initially we had [toc list: ul;] tag at the beginning of the document and while it was one long page - we had all sections of the document included. When we've introduced: <!-pagebreak--> element to break the page in a spot we chose, we have noticed that the TOC on the second page was missing. To alleviate this problem we thought that adding:

<!--pagebreak-->
[toc list: ul;]

Unfortunately, as a result of the syntax above, the TOC on the first page filters/diaplays content of only the first page, knowing nothing about the next page and so on - i.e. the second page does not have the full TOC (first and second page) but only the content of the second page.

Thanks so much for looking into this!

Margaret

#13

It's interesting to see that the Paging module is marked as a filter when in fact it isn't a filter at all.

The hook_nodeapi('load', ...) function is used to cut the page in pieces right then. That means the $node->body text is then totally ignored and the filters are run against the page being shown. This is a great optimization in the grand scheme of things, but a rather unexpected behavior for a Drupal module.

I guess that what would be necessary is to force the application of the TOC filter before the breakage. Then all the tags would have been transformed and the rest can go on as expected. However, this may require other filters to run too, not just the TOC (assuming that some of the data used by TOC is generated/output by some other filter system.)

As a test, I suggest we try the following:

1) apply the below patch against the paging.module

2) create a new Input Filter and get the new filter identifier

3) in the paging.module file replace the 5 by the new filter identifier (it could be changed in the patch before applying it)

4) try your long pages again

If you have some caches turned on, you may need to clear the cache. Otherwise it should work as is.

As you may notice, this applies the filter(s) as identifier in (2) on the whole body before paging. You may want to signal the paging author that his idea of cutting the data before applying filters is not always a good idea since some filters need to be applied to the whole page instead.

Thank you.
Alexis Wilke

AttachmentSize
tableofcontents-6.x-paging.patch 546 bytes

#14

Hi Alexis,

Thank you very much for the patch and instructions. We will give it a try on Monday and let you know about the outcome.

Thanks again and have a great weekend!

Margaret

#15

Hi Alexis,

For now we decided to name the pages. This functionality created a menu on the right side of the document breaking the document in sections. We will certainly apply your patch/instructions should this solution be unsatisfactory to our users.

Thanks again for your help!

Margaret

nobody click here