Boost Posted February 15, 2024 Posted February 15, 2024 Hey, Since you all are much smarter than me, I'd really appreciate your input on this task. So, here's the deal: I've got a layout with two columns, a sidebar, and the main section. What I want to do is take the H2 headings from my blog post and turn them into a table of contents. That way, I can have a section on my sidebar that acts like a TOC. Sure, I could manually add those entries to the TOC field, but do you happen to know of a more automatic way to do it? Cheers
ngrmm Posted February 15, 2024 Posted February 15, 2024 @Boost how are those H2 headings created? Through a textarea field or through custom textfield inside a repeater?
Boost Posted February 15, 2024 Author Posted February 15, 2024 Hei @ngrmmit's from the body textarea field using TinyMCE.
zoeck Posted February 15, 2024 Posted February 15, 2024 Wouldn't it make more sense to put the H2 headings in a separate field? Would also be easier for the editor ?
Boost Posted February 15, 2024 Author Posted February 15, 2024 8 minutes ago, zoeck said: Wouldn't it make more sense to put the H2 headings in a separate field? Would also be easier for the editor ? How would you do that?
zoeck Posted February 15, 2024 Posted February 15, 2024 Just create a new field in the admin and add it to your template? Here's a little tutorial ? https://www.smashingmagazine.com/2016/07/the-aesthetic-of-non-opinionated-content-management-a-beginners-guide-to-processwire/#three-simple-core-concepts
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now