<?php
$current_type='**Name a content type here**';
$contact_name='';
if (arg(1)=='add') {
// if adding we need to go get the parent title from the database
// url typically has parent nid in URL like this:
// /node/add/!!blanked!!/parent/39620
if (is_numeric(arg(4))) {
$tmp_node=node_load(arg(4));
$contact_name=$tmp_node->title;
}
}
if ($contact_name=='') {
// if editing we have parent title via token
$contact_name='[parent-title]';
}
if ($contact_name!='') {
$contact_name= str_replace ( ' (contact info)' , '', $contact_name );
return $current_type .' for '. htmlspecialchars_decode($contact_name, ENT_QUOTES);
} else{
// shouldn't ever be here, we hope
return $current_type;
}
?>