Boost Posted February 15 Share Posted February 15 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 Link to comment Share on other sites More sharing options...
ngrmm Posted February 15 Share Posted February 15 @Boost how are those H2 headings created? Through a textarea field or through custom textfield inside a repeater? Link to comment Share on other sites More sharing options...
Boost Posted February 15 Author Share Posted February 15 Hei @ngrmmit's from the body textarea field using TinyMCE. Link to comment Share on other sites More sharing options...
zoeck Posted February 15 Share Posted February 15 Wouldn't it make more sense to put the H2 headings in a separate field? Would also be easier for the editor ? Link to comment Share on other sites More sharing options...
ngrmm Posted February 15 Share Posted February 15 2 Link to comment Share on other sites More sharing options...
Boost Posted February 15 Author Share Posted February 15 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? Link to comment Share on other sites More sharing options...
zoeck Posted February 15 Share Posted February 15 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 Link to comment Share on other sites More sharing options...
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