开发者

Embed node creation form using PHP

I have a content type called "enquir开发者_如何转开发y". I want to embed the node creation form at various places throughout my website. How do I do this via PHP?


sounds like a job for the webform module. if you really want to go the cck route you can try something like this:

$node = new stdClass();
$node->type = 'store_review';
module_load_include('inc', 'node', 'node.pages');
$output = drupal_get_form('store_review_node_form', $node);
print $output;

ref: http://drupal.org/node/464906


Solution:

$node = new stdClass();
$node->type = 'enquiry';
module_load_include('inc', 'node', 'node.pages');
$output = drupal_get_form('enquiry_node_form', $node);
print $output;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜