2

I'm on the way to develop a website for a kind of a sport-league where we have every year one season with different teams. A team can be built out of two Users and they can play against other teams. There will be a kind of different Leagues (depending on how good they are..)

So my question is now, how to implement this? :P (Of course this is nit the main question, but I need some hints for my drupal-start :)

In drupal there is this concept of "Nodes". As I understood, a Node is a Content. And depending on the NodeType it is shown different.

How should I now implement for example a "Game". To the beginning of a season the site will create all the game-records. During the Season the users will enter the results into this game-records. They can write comments and probably rate the game.

For the edit-page I'm going to write my own module (guess this is the right path to go..) same I'll do for the rankings.. this should work! But how can i combine this "Node"-Concept with my "Database"-Concept I've learned before I get known to drupal?

Is it then possible to hide a specific Node-Type from Administration -> Content? I do not want to see there all the Games played during the last 10 Years as this would be quite a big list...

Any help/idea/hint would be very appreciated :)

6

Nodes are for content, complex data managed by your website are not necessarily content. In Drupal 6 and before, using node for everything was a common practice because only nodes could benefit easily from the CCK, Views and other modules. Drupal 7 introduced the concept of entities. You can create new entity type and for one entity type your can have multiple bundles. Node is an entity type and the content types (or node types) are bundles. Using the Field API, fields are defined by bundle to attach values to entities.

So you don't need, and probably shouldn't, manage everything as nodes but instead defines your own entity types and bundles to store and manage your site data. The Entity API module provides a better API to manage entities and entity types to complete Drupal core's one. The Model Entities project provides a model entity and entity administration interface to kick-start your entity related development. For Field API usage, the Examples for Developers project provides the field_example. You can also use Features to easily export field definitions into code.

| improve this answer | |
  • Guess that is exactly what I was looking for! Thx for this great hint! – Stefan Jul 14 '11 at 22:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.