简体   繁体   English

drupal -----在内容类型故事中添加一个字段

[英]drupal-----add a field to the content type story

now, i want to add a dead time field(the style is 02-12-2010) to the content type story. 现在,我想向内容类型故事添加一个停滞时间字段(样式为02-12-2010)。 how to do that, i used the hook_form_alter() and format_date(),but when i created a new article,and select the time.but the time can't show on the article's page.why? 如何做到这一点,我使用了hook_form_alter()和format_date(),但是当我创建新文章时,选择了时间。但是时间无法显示在文章的页面上。为什么?

Why don't try contributed modules instead? 为什么不尝试使用贡献模块呢?

A more elegant solution I think will be using the CCK module which provides the ability of adding new fields to content types (as well as creating new content types), you can install then the Date module provides you with the ability to attach date fields to content types. 我认为一个更优雅的解决方案将使用CCK模块,该模块提供向内容类型添加新字段的能力(以及创建新的内容类型),您可以安装,然后Date模块可以将日期字段附加到内容类型。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM