TYPO3 CMS 6.2中的其他页面属性字段 [英] Additional page property fields in TYPO3 CMS 6.2

查看:67
本文介绍了TYPO3 CMS 6.2中的其他页面属性字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在TYPO3 6.2中添加自定义页面属性字段的推荐方法是什么?
在4.5中,我使用了TemplaVoila,它具有自己的页面模块,可以轻松地在页面级别添加数据记录.

What would be the recommended method to add custom page property fields in TYPO3 6.2?
In 4.5 I used TemplaVoila which had its own page module and made it easy to add data records on a page level.

推荐答案

有几种方法:

  1. 香草"方法:

创建扩展名(以及文件ext_emconf.php),然后在扩展名根目录中创建文件ext_tables.sql.通过为页面表定义CREATE TABLE语句,您可以在其中为新字段添加SQL定义:

Create an extension (and with it the file ext_emconf.php) and then create a file ext_tables.sql in the extension root. In it you can put SQL-definitions for the new fields, by defining a CREATE TABLE statement for the pages table:

CREATE TABLE pages(
    myNewField int(11) DEFAULT '',
);

此SQL定义将与表page的现有定义合并.

This SQL-definition will be merged with existing definitions for the table page.

然后,您需要在表配置数组(TCA).通常,您可以在现有扩展中找到良好的示例,例如在realurl中.您可以在两个位置放置这些定义,或者放在文件ext_tables.php中(未缓存),或者放在文件夹Configuration/Tca/Overrides中的php文件中(已缓存).

Then you need to configure the new field in the Table Configuration Array (TCA). You can usually find good examples in existing extensions, for example in realurl. There are two places where you can put these definitions, either in the file ext_tables.php (uncached), or into a php file in the folder Configuration/Tca/Overrides (cached).

这种方法听起来比实际工作量还多.

This approach sounds like more work than it actually is.

  1. 只需使用TemplaVoila.它可用于TYPO3 6.2,但不确定其未来,AFAIK.

  1. Just use TemplaVoila. It is available for TYPO3 6.2, but its future is uncertain, AFAIK.

使用扩展名的 fluidtypo3 -Ecosystem,尤其是扩展名fluidpages.它与TemplaVoila相似,但具有现代(基于流体)技术,可以满足您的要求.

Use the fluidtypo3-Ecosystem of extensions, and especially the extension fluidpages. It does what you want, in a similar way to TemplaVoila, but with modern (= fluid-based) technologies.

这篇关于TYPO3 CMS 6.2中的其他页面属性字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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