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

XF 1.4 Delete Subforum from Forum not Hide with CSS

#3
Hello,

then the forum but did not appear. Also when clicking on the corresponding parent forum is not displayed.

My Idea was delete from node_forum_level_2 Template this

Code:
<xen:if is="{$renderedChildren} AND {$level} == 2 AND {xen:property 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} == 2 AND !{xen:property nodeListSubForumPopup}">
            <ol class="subForumList">
            <xen:foreach loop="$renderedChildren" value="$child">
                {xen:raw $child}
            </xen:foreach>
            </ol>
        </xen:if>
 

Brogan

XenForo moderator
Staff member
#4
You said you wanted to remove them from view without using CSS.

It's not really clear what you are trying to achieve.
 
#5
Hello,

I want to remove all items as marked in the screenshot, but hide not only with CSS. Say I want only this selection menu so remove the links. I have over 1000 forums / subforums and SEO is not as good, if this all appear as links in this menu. I hide it with CSS from will still appear in the source code, and hence for robots and links subforums.
Sorry for my bad English.

1.png
 
#9
Hello,

then the forum but did not appear. Also when clicking on the corresponding parent forum is not displayed.

My Idea was delete from node_forum_level_2 Template this

Code:
<xen:if is="{$renderedChildren} AND {$level} == 2 AND {xen:property 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} == 2 AND !{xen:property nodeListSubForumPopup}">
            <ol class="subForumList">
            <xen:foreach loop="$renderedChildren" value="$child">
                {xen:raw $child}
            </xen:foreach>
            </ol>
        </xen:if>
Would this change then correctly or I have too much away?
 

Mike

XenForo developer
Staff member
#10
That might be a little much to remove. I think you may want to focus on the 2 main <xen:if> tags and remove those/the contents of them.