function wikitools_create_url in Wikitools 6.2
Same name and namespace in other branches
- 5 wikitools.module \wikitools_create_url()
- 6 wikitools.module \wikitools_create_url()
- 7 wikitools.module \wikitools_create_url()
Build an url to create a new node.
Parameters
$type: type of new node
$title: title of new node
File
- ./
wikitools.module, line 310 - A non-intrusive module to have some wiki-like behaviour.
Code
function wikitools_create_url($type, $title) {
if (is_object($type)) {
$type_url_str = str_replace('_', '-', $type->type);
}
else {
$type_url_str = str_replace('_', '-', $type);
}
return url("node/add/{$type_url_str}", array(
'query' => 'edit[title]=' . urlencode($title),
));
}