Jump to content

Clubs issue


CodingJungle

Recommended Posts

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 :) 

Link to comment
Share on other sites

  • 2 weeks later...

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;
    }

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...