在 Drupal 中更改节点创建标题? [英] Changing the Node Creation Title in Drupal?

查看:25
本文介绍了在 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
    • 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 中更改节点创建标题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆