get('title', $title); if ($node->count() > 0) { // node exists, process $node->fetch(); // NULL extension indicates void image // XXX: kind of hacky, maybe we should rather opt for a specific field if (is_null($node->extension)) { $image_src = NULL; } else { $image_src = IMAGE_DIR . $title . '.' . $node->extension; } } else { // node does not exists (yet) $image_src = NULL; } $tpl->assign('title', $title); $tpl->assign('self', $_SERVER['PHP_SELF']); $tpl->assign('header', $tpl->fetch("edit_links_header.tpl.php")); $tpl->assign('onload', 'onload="init()"'); $tpl->assign('image_src', $image_src); $tpl->display('edit_links.tpl.php'); ?>