-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Closed
Copy link
Labels
[Block] Table of contents (experimental)Affects the Table of contents BlockAffects the Table of contents Block[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
The Table of Contents block pulls in every heading on the page, including headings outside the page content when in "Show template" view. I expected the ToC to only show content on the page. I even tried the "Only include current page" toggle, but it still included the footer content. This was only fixed by disabling "Show template" view, but since that doesn't persist I need to keep changing it.
Step-by-step reproduction instructions
- Set up a page template with headings in the template, for example the footer
- Write a page with headings
- Add a Table of Contents block
- With the page in "template view", the headings in the footer are included in the list
- Switch off "Show template" and the footer headings disappear
Whichever state the ToC is in when it's saved is what appears on the frontend.
Screenshots, screen recording, code snippet
Toggling the template view, you can see the Footer items disappear:
toc-toggle-template.mp4
Environment info
- WordPress 6.7.2
- GB 20.3.0
- Firefox & MacOS
yogeshbhutkar
Metadata
Metadata
Assignees
Labels
[Block] Table of contents (experimental)Affects the Table of contents BlockAffects the Table of contents Block[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended