By alkahan on
Hi!
I try to develop a module (competition) which define 2 new node types (competition-player and competition-team). So i define the two next functions :
function competition_node_types() {
return array('competition-player', 'competition-team');
}
function competition_node_name($node) {
switch (is_string($node) ? $node : $node->type) {
case 'competition-player':
return t('player');
case 'competition-team':
return t('team');
}
}
And it works, but...
the field 'type' in the table 'node' in the database is limited to 10 characters, and 'competition-player' is too long. So I have change their name to 'team' and 'player', but this doesn't works. We must prefix names of the node types by the name of the module. Why? Is their a solution to my problem?
Comments
Been there, done that...
...have a look here for a workaround.
http://drupal.org/node/34590
It's fixed in 4.7, apparently.
thanks for your answer
thanks for your answer