Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Extending silverstripe


Go to End


2 Posts   1341 Views

Avatar
CrazyCoders

Community Member, 32 Posts

22 June 2009 at 3:28am

I'm trying to create my own module that is based on it's own LeftandMain (i need that because i have lots of data that i want to manipulate and the normal sitetree is not really the place to do so.)

I tried using both LeftAndMain and ModelAdmin but both doesn't seem sufficient enough or adapted enough thus i have started to create my own branch of classes. So far, i'm able to add a menu option to the main menu, i make a kind of tree appear but i seem to have a problem with the function:

function getSiteTreeFor($className, $rootID = null, $childrenMethod = null, $filterFunction = null) {

When i call it using this code:

return $this->getSiteTreeFor("WebSportModulePage");

But sadly, it doesn't seem to work, it always builds the whole tree. What i'd want is to understand how to build my own tree that triggers specific editors derived from WebSportModulePage (which extends sitetree). I also want to make sure that WebsportSiteTree is not available in normal site content because these are specific model editors that only appears in WebSportAdmin.

So:

1. I need help to draw a tree of elements all based on the following classes that will be created as time goes on:

1.1. WebSportEventModule
1.1.1. WebSportGameModule
1.1.2. WebSportPracticeModule
1.1.3. WebSportTournamentModule
1.1.4. etc...
1.2. WebSportStructureModule
1.2.1. WebSportSeasonManageModule
1.2.2. WebSportTeamModule
1.2.3. WebSportProfileModule
1.2.4. WebSportProfileTypeModule
1.2.5. etc...

So what would be my correct strategy to implement that?

2. I'd like to prevent the site & content to display my WebSportModules BUT i will have WebSportPages that the user can instanciate to display in his site. WebSportAdmin is used to manage the whole data (which is quite big) and WebSportPages is used to display the data in the database based on various filters and configurations that the user can setup in the normal site & content pages.

Thanks

PS: I'm pretty good at programming and very polyvalent, but this has been a hard to understand project since the module development code is pretty sparse and hard to understand. I love the concept behind SS and want to push it to it's limits and even become a partner later, so i need to learn the engine and be able to extend it to it's max!

Thanks for the help you may bring!

Avatar
CrazyCoders

Community Member, 32 Posts

23 June 2009 at 2:19am

Was that too complex? Nothing in 20 hours!