By shabdix on
Hi there,
I,m developing a module for serving Data to a customer.
his request is to create dynamic types to save anything that he needs.
i create Node_info() hook like this:
function foo_node_info() {
$nodes = array();
$result = db_query('SELECT * FROM {foo_types};');
while($row = db_fetch_object($result)) {
$nodes[$row->name] = array(
'name' => t($row->title),
'module' => 'foo',
'description' => t($row->description),
'has_title' => FALSE,
'has_body' => FALSE,
);
}
return $nodes;
}
but ap problem. drupal caches node types and i dont know how to disable caching of node types!!
next question is that: is this way correct???
Comments
Why not use CCK and give them
Why not use CCK and give them access to creating content types?
that site have more than 10
that site have more than 10 administrator user that work together and because of some reasons I don't want the Admin users access administration section and also that I create data types with some restrictions.
any Other way that the above code works???
if a function exists that flushes node type cache table after I add a node type???
You might study CCK to see
You might study CCK to see how it works.