Creating tabbed contents

AI-generated summary

Creating Tabbed Contents: PaulSTC wants to enable users to post content with tabs on his problem-solving case study forum, allowing viewers to think of their own answers before seeing the next part. He’s currently using nested ‘hidden text’, but finds it inelegant and difficult for general users. He’s aware of easier methods using CSS/javascript/wordpress, such as those found on W3Schools, WordPress plugins, and WPBeginner. He’s asking if a similar function can be created in Discourse. codinghorror suggests creating a topic template to demonstrate how to achieve this.

I’d like to enable users to post content with ‘tabs’.

I host a forum where users share and discuss problem-solving case studies. I want to have tabbed contents to allow viewers to think of their own answers for each part, before clicking ahead to view the answer or the next part of the problem. This would make the cases much more fun to read.

The only thing I can think of is using nested ‘hidden text’ - which isn’t very elegant or easy for general users. For example, it took reasonable effort to make the following content-

########################
Part 1 of case study

What is the best next step?

Answer to Part 1

########################

Part 2 of case study

What is the best next step?

Answer to Part 2

########################

Part 3 of case study

What is the best next step?

Answer to part 3. The End.

,

########################
.
There seems to be easier ways of doing it in CSS/javascript/wordpress by using tabs:

Is there a way of creating a similar function in discourse?

You could create a topic template in the relevant category, and the template would demonstrate how to do it as a pre-filled example.