Changing CCK Title for Form(更改表单的 CCK 标题)
问题描述
默认情况下,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变量.您可以使用如 lazy 建议的预处理函数来完成此操作.
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 标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:更改表单的 CCK 标题


- 如何在 Symfony2 中正确使用 webSockets 2021-01-01
- PHP - if 语句中的倒序 2021-01-01
- 使用 GD 和 libjpeg 支持编译 PHP 2022-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- openssl_digest vs hash vs hash_hmac?盐与盐的区别HMAC? 2022-01-01
- PHP foreach() 与数组中的数组? 2022-01-01
- 覆盖 Magento 社区模块控制器的问题 2022-01-01
- 如何使用 Google API 在团队云端硬盘中创建文件夹? 2022-01-01
- Laravel 5:Model.php 中的 MassAssignmentException 2021-01-01
- 如何从数据库中获取数据以在 laravel 中查看页面? 2022-01-01