1. 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?

Discussion in 'XenForo Development Discussions' started by Stuart Wright, May 18, 2013.

  1. Stuart Wright

    Stuart Wright Well-Known Member

    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?
  2. Chris D

    Chris D XenForo Developer Staff Member

    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.
  3. Stuart Wright

    Stuart Wright Well-Known Member

    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?
  4. Chris D

    Chris D XenForo Developer Staff Member

    The member_view template contains the user profile tabs.

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

    HenrikHansen Well-Known Member

Share This Page