本文介绍了在 Drupal 中更改节点创建标题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
假设我有一个名为product"的节点.当我创建这样一个节点时,它总是显示:创建产品"作为节点的标题.创建节点时如何更改此标题?
Let's say I have a node called "product". When I create such a node, it will always display: "Create product" as the title of the node. How do I change this title WHEN CREATING THE NODE?
推荐答案
你的意思是你有一个 内容类型产品"?
you mean you have a content type "product"?
创建产品"类型节点时的创建产品"标题在中设置node_add($type)
:
the "Create product" title when creating a node of type "product" is set in node_add($type)
:
// ...
drupal_set_title(t('Create @name', array('@name' => $types[$type]->name)));
$output = drupal_get_form($type .'_node_form', $node);
// ...
至少有两个选项可以改变这个:
there are at least 2 options to change this:
- 更改可翻译字符串Create @name"(由
t()
是通过) via- settings.php - 搜索
locale_custom_strings_
,或 - http://drupal.org/project/stringoverrides
- change the translatable string 'Create @name' (indicated by the
t()
it is passed through) via- settings.php - search for
locale_custom_strings_
, or - http://drupal.org/project/stringoverrides
这篇关于在 Drupal 中更改节点创建标题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
- settings.php - search for
- settings.php - 搜索