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

查看:84
本文介绍了更改Drupal中的节点创建标题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有一个名为产品的节点。创建此类节点时,它将始终显示:创建产品作为该节点的标题。在创建节点时如何更改此标题?

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() 通过)通过

    • 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天全站免登陆