XF 1.5 Increase forum home node visibility depth?

Hi,

I'm about to switch to XenForo, but I have a very "particular need": I need to have a bigger depth in home for nodes visibility.

Let me explain, my forum has this structure:

Macrocategory (Can't post anything here)
|_ Category (Can't post anything here)
||||_ Sections
|||||||_ Subsections

If I try this structure, in the forum home I get Macrocategory that shows category as they are sections (and with a tab that shows all the sections as the are subsections).

I need that I show Macrocategory and Category as titles (as they are now the categories) and the sections/nodes as they usually are showed (same for subsections as "tab" to open).

How I can achieve this? There's some plugin or setting?

Here I made a little image about what I need:

sections.webp
 
After some tweaking, I've partially got what I needed by editing a XenForo file: /library/XenForo/NodeHandler/Forum.php

Here there is this line:
PHP:
$templateLevel = ($level <= 3 ? $level : 'n');

Where i changed 2 to 3, after I created a new template called "node_forum_level_3" with this content:

PHP:
<xen:require css="node_list.css" />
<xen:require css="node_forum.css" />

<li class="node forum level_{$level} {xen:if '{$level} == 2 AND !{$renderedChildren}', 'groupNoChildren'} node_{$forum.node_id}">

    <xen:if is="{$level} == 2"><div class="categoryStrip subHeading"></div></xen:if>

    <div class="nodeInfo forumNodeInfo primaryContent {xen:if $forum.hasNew, 'unread'}">

        <span class="nodeIcon" title="{xen:if $forum.hasNew, '{xen:phrase unread_messages}', ''}"></span>

        <div class="nodeText">
            <h3 class="nodeTitle"><xen:if is="{$watchCheckBoxName}"><input type="checkbox" name="{$watchCheckBoxName}" value="{$forum.node_id}" />&nbsp;</xen:if><a href="{xen:link forums, $forum}" data-description="{xen:if @nodeListDescriptionTooltips, '#nodeDescription-{$forum.node_id}'}">{$forum.title}</a></h3>

            <xen:if is="{$forum.description} AND @nodeListDescriptions">
                <blockquote class="nodeDescription {xen:if @nodeListDescriptionTooltips, nodeDescriptionTooltip} baseHtml" id="nodeDescription-{$forum.node_id}">{xen:raw $forum.description}</blockquote>
            </xen:if>

            <div class="nodeStats pairsInline">
                <dl><dt>{xen:phrase discussions}:</dt> <dd>{xen:if $forum.privateInfo, '&ndash;', {xen:number $forum.discussion_count}}</dd></dl>
                <dl><dt>{xen:phrase messages}:</dt> <dd>{xen:if $forum.privateInfo, '&ndash;', {xen:number $forum.message_count}}</dd></dl>
                <xen:if is="{$renderedChildren} AND {$level} == 3 AND @nodeListSubForumPopup">
                    <div class="Popup subForumsPopup">
                        <a href="{xen:link forums, $forum}" rel="Menu" class="cloaked" data-closemenu="true"><span class="dt">{xen:phrase sub_forums}:</span> {xen:number $forum.childCount}</a>
                        
                        <div class="Menu JsOnly subForumsMenu">
                            <div class="primaryContent menuHeader">
                                <h3>{$forum.title}</h3>
                                <div class="muted">{xen:phrase sub_forums}</div>
                            </div>
                            <ol class="secondaryContent blockLinksList">
                            <xen:foreach loop="$renderedChildren" value="$child">
                                {xen:raw $child}
                            </xen:foreach>
                            </ol>
                        </div>
                    </div>
                </xen:if>
            </div>
            
            {xen:raw $nodeExtraHtml}
        </div>

        <xen:if is="{$renderedChildren} AND {$level} == 3 AND !@nodeListSubForumPopup">
            <ol class="subForumList">
            <xen:foreach loop="$renderedChildren" value="$child">
                {xen:raw $child}
            </xen:foreach>
            </ol>
        </xen:if>
        
        <xen:hook name="node_forum_level_2_before_lastpost" params="{xen:array 'forum={$forum}'}" />

        <div class="nodeLastPost secondaryContent">
            <xen:if is="{$forum.privateInfo}">
                <span class="noMessages muted">({xen:phrase private})</span>
            <xen:elseif is="{$forum.lastPost.date}" />
                <span class="lastThreadTitle"><span>{xen:phrase latest}:</span> <a href="{xen:link posts, $forum.lastPost}" title="{$forum.lastPost.title}">{$forum.lastPost.title}</a></span>
                <span class="lastThreadMeta">
                    <span class="lastThreadUser"><xen:if is="{xen:helper isIgnored, $forum.last_post_user_id}">{xen:phrase ignored_member}<xen:else /><xen:username user="$forum.lastPost" /></xen:if>,</span>
                    <xen:datetime time="$forum.lastPost.date" class="muted lastThreadDate" data-latest="{xen:phrase latest}: " />
                </span>
            <xen:else />
                <span class="noMessages muted">({xen:phrase contains_no_messages})</span>
            </xen:if>
        </div>

        <div class="nodeControls">
            <a href="{xen:link forums/index.rss, $forum}" class="tinyIcon feedIcon" title="{xen:phrase rss}">{xen:phrase rss}</a>
        </div>
        
    </div>

    <xen:if is="{$renderedChildren} AND {$level} == 2">
        <ol class="nodeList">
            <xen:foreach loop="$renderedChildren" value="$child">{xen:raw $child}</xen:foreach>
        </ol>
    </xen:if>

</li>


Now this is the result in the Board home:

521275c829615afb4aed5b9471e879b8.png


But I've got a "bug",
if I go to "Sezione" (it's a Forum node, where it's possible to post) I got a strange subforum sub-subforums list:

6ecfbd71f7ded081c6cb8e6636312953.png


How I can get the subforums list as the first image?

P.S: What I done it's a bad pratice? there's better ways to achieve what I need?
 
Back
Top Bottom