TYPO3 后端:搜索自定义记录 [英] TYPO3 backend: search custom records

查看:93
本文介绍了TYPO3 后端:搜索自定义记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一个允许创建新记录的扩展.

I developed an extension which allows creation of new records.

在列表模块中,在记录列表下,有搜索表单.

In List module, under the records list, there is the Search form.

例如,它适用于 fe 用户,但不适用于我的自定义记录.

It works with fe users for example, but not with my custom records.

是否需要在我的 tca 中添加任何特殊配置才能使此表单与我的自定义记录一起使用?

Is there any special configuration that I have to add in my tca to make this form work with my custom records?

EDIT:这似乎是在更新到 TYPO3 4.6 后发生的.在之前的版本 4.3.3 中,它可以工作.

EDIT: This seems to be happening after updating to TYPO3 4.6. In the previous version, 4.3.3, it works.

谢谢.

推荐答案

编辑 typo3conf/ext/yourext 目录下的 ext_tables.php 文件,找到你的表,并添加到它的 ctrl 部分 searchFields 属性作为要搜索的字段的逗号分隔列表:

Edit ext_tables.php file in typo3conf/ext/yourext directory, find your table, and add to its ctrl section searchFields property as comma separated list of fields to search in:

$TCA['tx_yourext_table'] = array(
    'ctrl' => array(
        'title' => 'Title of your table',
        'label' => 'title',
        'tstamp' => 'tstamp',
        'crdate' => 'crdate',
         // etc...
        'searchFields' => 'title, other_field, yet_other_field',
    ),
);

之后不要忘记清除所有缓存,适用于 4.6.3

Don't forget to clear all caches after that, works at 4.6.3

官方信息更改时间和原因

这篇关于TYPO3 后端:搜索自定义记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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