Jump to content

Clubs issue


CodingJungle

Recommended Posts

Posted

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

  • 2 weeks later...
Posted

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?

Posted

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

 

Archived

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

  • Recently Browsing   0 members

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