更改表格的CCK标题 [英] Changing CCK Title for Form
问题描述
默认情况下,CCK表单创建的标题为
By default a CCK form creation has a title of the form
Create [Your Content Type Name Here]
我想将我更改为
Register for Such and Such
有人建议我可以使用字符串覆盖,但是我找不到要替换的字符串。我也尝试过将代码写入form_alter,但似乎无法弄清楚如何使标题更改。
It was suggested that I could use string-override, but I can't find the string to replace. I've also tried writing code to form_alter, but can't seem to figure out how to get the "title" to change.
想法?
推荐答案
有两种可能性,您可以使用页面模板中使用的主题铺设和设置$ title变量。您可以使用预处理功能(如懒惰建议)来执行此操作。
There are two possibilities, either you can use the theming laying and set $title variable used in the page templage. You can do this with a preprocess function like lazy suggests.
我更喜欢的其他选项是使用drupal_set_title(),这将需要进入模块。我还没有尝试过,但我认为你可以在你的hook_form_alter()实现中使用这个。这样你可以控制哪些标题变得很容易。
The other options which I prefer would be to use the drupal_set_title(), this would need to go in a module. I haven't tried this, but I would think that you could use this in your hook_form_alter() implementation. That way you could control which titles get changed pretty easily.
这篇关于更改表格的CCK标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!