digitalpoint
Well-known member
I've been working on something that involves creating a new node type that has sub-types (similar to how the
While not impossible to do, it involves extending classes and template modifications because the way XenForo handles the Forum sub-types, they are hard-coded one-off exceptions. Basically it's just not very clean.
It would be nice if the
There is also one-off logic for the Forum node type in
Like what if you wanted to have new sub-type options for "Page" nodes? You would need to go add logic for that node type in templates and controller. We already have a NodeType handler... why not use it to define any sub-types (if there are any)?
I've worked around it already with template modifications and class extensions, but it doesn't "feel right" compared to how nicely abstracted most things are in XenForo.
Having the node sub-types abstracted out would (easily) allow some interesting things... maybe you want a Resource Manager node that is just XF2 addons, or maybe a Media Gallery node of a certain type.
Forum
node type has General discussion
, Article
, Question
and Suggestion
sub-types).While not impossible to do, it involves extending classes and template modifications because the way XenForo handles the Forum sub-types, they are hard-coded one-off exceptions. Basically it's just not very clean.
It would be nice if the
admin:node_add
template called a method in the node handler to see if there are any sub-types and do it's magic that way rather than the template doing something special specifically with <xf:if is="$nodeType.node_type_id == 'Forum'">
.There is also one-off logic for the Forum node type in
XF\Admin\Controller\Node->actionAdd()
(both the $viewParams and picking up the forum_type_id upon submission).Like what if you wanted to have new sub-type options for "Page" nodes? You would need to go add logic for that node type in templates and controller. We already have a NodeType handler... why not use it to define any sub-types (if there are any)?
I've worked around it already with template modifications and class extensions, but it doesn't "feel right" compared to how nicely abstracted most things are in XenForo.
Having the node sub-types abstracted out would (easily) allow some interesting things... maybe you want a Resource Manager node that is just XF2 addons, or maybe a Media Gallery node of a certain type.
Last edited:
Upvote
3