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

Listing Child Node Titles

Discussion in 'Styling and Customization Questions' started by Miz, Aug 15, 2011.

  1. Miz

    Miz Member

    Hello, hopefully this question is aimed at the right forum.

    I am trying to make a system of tabs for our forum's index. As one category has grown far too large and we want to condense it some. Now I can set up the tab regions and the javascript required properly, however what is troubling is I can't seem to make the actual area where the tabs appear to have the title of the forums inside the tabs with the Xenforo template language.
    Mainly I am trying to make it so it will list all the child-nodes under the parent category.

    What I am aiming for is that inside of template node_category_1, I want to create a unordered list (ul) with each list entry (li) being a tab titled for each rendered child for category id 26.

    Desired object:
    <li id="tab-[child forum node id here]">[child forum title]</li>
    Yet regardless of how I do a xen foreach statement, I can't get it to ether load properly, or not have a template error.

    Area in node_category_1:
        <xen:if is="{$category.node_id} == 26">
        <xen:if is="{$renderedChildren}">
        <ol id="the-stage-tabs">
          <ul> <!--- Tab Li with Titles here ---> </ul>
      <xen:foreach loop="$renderedChildren" value="$child">{xen:raw $child}</xen:foreach>
    Hopefully I made sense. Thanks to anyone who can help. :)

    Edit - Slight typo in code
  2. Miz

    Miz Member

    Bump? I am still hoping for some kind of response on this issue. :oops:
    I have added an example image. Hope that gives a little bit more information.
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I played with the template code but I was unable to directly access the titles of the children in $renderedChildren. That array contains template objects and I can't seem to get at the _params.

    You can dump the entire thing with this code:

    {xen:helper dump, $renderedChildren}
    That is all I was able to do.

Share This Page