CodingJungle Posted August 30, 2019 Posted August 30, 2019 Okay you use the content router extension to determine which nodes class can be used in clubs. however this is extremely limited if you are using Parent/Subnode's and the item class belongs to the subnode. I'm not entirely sure how to work around this, i can't easily change my $nodeClass prop in my item's class to point to the parentnode class and i'm not seeing an easy way to trick the system to kick it up to the parentNode. maybe adding in a method to the item's class that we can define club node ourselves or add in a clubContainer extension instead of using the content router. i mean i know parent/subnodes aren't common, but the ability is there and there isn't really any reason why they should be blocked from clubs :)
CodingJungle Posted September 10, 2019 Author Posted September 10, 2019 bump, you will not get away from me! 😛 do i have to make another video?
bfarber Posted September 11, 2019 Posted September 11, 2019 It's kind of hard to action this since we have no use for (or even a quick and easy way to test) the functionality internally. Is there any way to add the support you're after using a hook?
CodingJungle Posted September 13, 2019 Author Posted September 13, 2019 okay for posterity or anyone else who needs to do this, i created a hook for \IPS\Member\Club and overloaded the method "availableNodeTypes" and added the class that is the club container for my app to the array returned by the parent method. public static function availableNodeTypes( \IPS\Member $member = null ) { $return = parent::availableNodeTypes( $member ); $return[] = Project::class; return $return; }
Recommended Posts
Archived
This topic is now archived and is closed to further replies.