As designed Sub node of a forum" type node with no parent

alternadiv

Well-known member
Affected version
2.2
I have a special node of the "forum" type that intentionally doesn't belong to a parent category.

I just added a sub node to it but the new sub node doesn't really display consistent with how sub nodes normally would. I'm not sure if this is intended or if it's a bug due to the unusual configuration.

Rig of the Month: December 2020 is a forum type with no parent. Rig of the Month: Archive is a child of that one but it displays like it isn't a sub node:

1606865656301.webp
 
Hello, i notice that too. As there is no category a parent is missing so subforum became a forum (in my mind...).
you can prevent this with a normal configuration CATEGORY -- FORUM -- SUBFORUM and hide category title with CSS.
CSS:
.block.block--category.block--categoryID .block-header {
    display: none;
}
 
Yes it is still an issue. Original bug below.

I had to cave in and add a category which I did not want.
 
I had to cave in and add a category which I did not want.
BECAUSE it also does this:
 
Hello, i notice that too. As there is no category a parent is missing so subforum became a forum (in my mind...).
you can prevent this with a normal configuration CATEGORY -- FORUM -- SUBFORUM and hide category title with CSS.
CSS:
.block.block--category.block--categoryID .block-header {
    display: none;
}
This is a good idea for a workaround. Thanks.
 
As noted in the linked bug, this is more or less expected, as the level1 and level2 forums have basically the same styling. (Actually, this applies to most node types, other than categories.) This has been the case going back to XF 1.0 as well.

CSS (or template) changes can be made for your specific needs if desired and of course you could use a parent category. At this time, we aren't planning any specific changes for this situation.
 
Yes it is still an issue. Original bug below.

I had to cave in and add a category which I did not want.

I think I may have figured a way to get it to work (still using XF 2.1):

In the node_list_forum template do the following:

Search for the line:
<xf:if is="$depth == 2 AND property('nodeListSubDisplay') == 'menu'">
and before the </xf:if> closing tag add the following:
<xf:elseif is="$depth == 1 AND property('nodeListSubDisplay') == 'menu'" />
<xf:macro template="forum_list" name="sub_nodes_menu"
arg-children="{$children}"
arg-childExtras="{$childExtras}"
arg-depth="{{ $depth + 1 }}" />
Then comment out the following (i.e place it within the <xf:comment></xf:comment> tags):
<xf:if is="{$depth} == 1">
<xf:macro template="forum_list" name="node_list"
arg-children="{$children}"
arg-extras="{$childExtras}"
arg-depth="{{ $depth + 1 }}" />
</xf:if>

Good luck,
And please let me know if there are any problems with this approach...

:)
 
Last edited:
Back
Top Bottom