• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

How do I put an expandable area in a node?

Stuart Wright

Well-known member
#1
Hi folks,
is there a class or method I can use to put an expandable area into a node?
I bet there is a really sexy animated open/close widget I can use.
In our Contact Us page, I want to define several sections:
  • Contact Site Admin
  • Contact Forum Admin
  • Contact Editorial Admin
  • Contact Advertising
(not necessarily in bullet points)
and the visitor can click each one to expand the list of contacts for each section.
I don't want to be reinventing the wheel. Is there already a way of doing this please?
Thanks
 

Chris D

XenForo developer
Staff member
#2
The "XenForo way" is typically to use tabs like you see on the user profile pages and they are quite easy to set up too. It's just two unordered list. The first list contains the list items with certain classes applied and this will be your tabs and the second set of list items is the content of your tabs. JQuery handles the rest.


That doesn't mean to say you'd have to do it like that. Just that it's consistent with other functionality.
 

Stuart Wright

Well-known member
#3
Tabs are a good idea, Chris. They would have to be tabs over a box within the node rather than in the main menu. Is there an example template I can copy?
 

Chris D

XenForo developer
Staff member
#4
The member_view template contains the user profile tabs.

You might be able to use that as a starting point.