Skip to content

Conversation

@dashaluna
Copy link
Owner

…play TOC - flat or nested list. TODO: nested list doens't quite work

Issue #23

…play TOC - flat or nested list. TODO: nested list doens't quite work
@dashaluna
Copy link
Owner Author

@tcrsavage I've used your code for the nested TOC structure. I've edited it to work with real headers and TOC items array.. and managed to break it - oops.

Here is the example post content that I was testing on and headers h3 don't seem to be nested correctly. Was wondering if you could have a look at it with me as I'm a bit stuck. Thanks :)

[hm_content_toc title="The TOC" headers="h2, h3, h4, h5, h6" type="nested"]
<h2>Header's 2</h2>
Some text here. Some text here. Some text here.
<h3>Header= 3</h3>
Some text here. Some text here. Some text here.
<h3>Header= 3</h3>
Some text here. Some text here. Some text here.
<h3>Header= 3</h3>
Some text here. Some text here. Some text here.
<h3>Header= 3</h3>
Some text here. Some text here. Some text here.
<h5>Header's 5</h5>
Some text here. Some text here. Some text here.
<h2>Header 2</h2>
Some text here. Some text here. Some text here.
<h3>Header 3</h3>
Some text here. Some text here. Some text here.
<h4>Header. 4;</h4>
Some text here. Some text here. Some text here.
<h3>Header 3</h3>
Some text here. Some text here. Some text here.

@dashaluna dashaluna changed the title Added type param to the shortcode to chose what HTML structure to dis… Hierarchical TOC structure Jul 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants