I created my first block in drupal. It basically creates a node create link for the places content type. But someone it doesn't work.
Can someone help me with this.
function custom_site_block($op = 'list', $delta = 0, $edit = array()) {
$blocks = array();
if ($op == "list") {
// Generate listing of blocks from this module, for the admin/block page
$blocks['create_place'] = array(
'info' => t('Create a place'),
'cache' => BLOCK_CACHE_GLOBAL,
);
}
else {
$form = array();
$form['#action'] = url('node/add/place');
$form['create'] = array(
'#type' => 'submit',
'#value' => t('Create a place'),
);
}
return $blocks;
}