如何在Drupal的其它页面中嵌入内容类型表单(content type form)
在Drupal中,我们创建一个内容时,通常使用这样的路径node/add/article,或者node/add/page,这里面的article和page,就是相应的内容类型,对应的页面,就是article和page这两个内容类型的表单页面。
现在,如果我想在别的Drupal页面中输出,article内容类型的表单(content type form),该怎么办呢?
在drupal 7中,我们使用这样的代码:
$form['title'] = array(
'#type' => 'textfield',
'#title' => t('Title'),
'#required' => TRUE,
);
$node = (object) array(