Login  Register

Problem with nested Table of Contents in included pages?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Problem with nested Table of Contents in included pages?

lincolnthree
I have two pages with a ToC, one nests the other:

http://ocpsoft.org/rewrite/docs/master#_prettyfaces_3_x_migration_guide

The included page's ToC seems to be the same as the outer page, which doesn't seem right :/

Could that be a problem with my include processor?

https://github.com/ocpsoft/redoculous/blob/master/app/src/main/java/org/ocpsoft/redoculous/render/GridIncludeProcessor.java#L46

What am I doing wrong here?
~~~ Rewrite
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Problem with nested Table of Contents in included pages?

lincolnthree
Also, it appears that the nesting level of other headers in the ToC from after the second ToC are now incorrect.
~~~ Rewrite
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Problem with nested Table of Contents in included pages?

mojavelinux
Administrator
In reply to this post by lincolnthree

On Thu, Oct 31, 2013 at 7:28 AM, lincolnthree [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I have two pages with a ToC, one nests the other:

That, right there, is your problem. At the moment, the ToC is not a contextual object. It outputs the ToC for the whole document no matter where you insert it.

You'll need to file an issue to either make the ToC contextual, so it starts with the current part/chapter/section and/or provide an option to specify the start and end range of the ToC to output.

Keep in mind, you can override the block_toc view template and print out the ToC however you would like. Obviously, though, it's nice to have this behavior out of the box.

-Dan
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Problem with nested Table of Contents in included pages?

lincolnthree


On Thu, Oct 31, 2013 at 8:32 PM, mojavelinux [via Asciidoctor :: Discussion] <[hidden email]> wrote:

On Thu, Oct 31, 2013 at 7:28 AM, lincolnthree [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I have two pages with a ToC, one nests the other:

That, right there, is your problem. At the moment, the ToC is not a contextual object. It outputs the ToC for the whole document no matter where you insert it.

You'll need to file an issue to either make the ToC contextual, so it starts with the current part/chapter/section and/or provide an option to specify the start and end range of the ToC to output.

Keep in mind, you can override the block_toc view template and print out the ToC however you would like. Obviously, though, it's nice to have this behavior out of the box.

-Dan



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Problem-with-nested-Table-of-Contents-in-included-pages-tp913p916.html
To unsubscribe from Problem with nested Table of Contents in included pages?, click here.
NAML



--
Lincoln Baxter, III
http://ocpsoft.org
"Simpler is better."
~~~ Rewrite
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Problem with nested Table of Contents in included pages?

mojavelinux
Administrator

Thanks! We'll continue the design discussion there.

-Dan

On Nov 1, 2013 12:39 AM, "lincolnthree [via Asciidoctor :: Discussion]" <[hidden email]> wrote:


On Thu, Oct 31, 2013 at 8:32 PM, mojavelinux [via Asciidoctor :: Discussion] <[hidden email]> wrote:

On Thu, Oct 31, 2013 at 7:28 AM, lincolnthree [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I have two pages with a ToC, one nests the other:

That, right there, is your problem. At the moment, the ToC is not a contextual object. It outputs the ToC for the whole document no matter where you insert it.

You'll need to file an issue to either make the ToC contextual, so it starts with the current part/chapter/section and/or provide an option to specify the start and end range of the ToC to output.

Keep in mind, you can override the block_toc view template and print out the ToC however you would like. Obviously, though, it's nice to have this behavior out of the box.

-Dan



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Problem-with-nested-Table-of-Contents-in-included-pages-tp913p916.html
To unsubscribe from Problem with nested Table of Contents in included pages?, click here.
NAML



--
Lincoln Baxter, III
http://ocpsoft.org
"Simpler is better."
~~~ Rewrite



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Problem-with-nested-Table-of-Contents-in-included-pages-tp913p918.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML