TYPO3后端:搜索自定义记录(TYPO3 backend: search custom records)

编程入门 行业动态 更新时间:2024-10-14 10:38:13
TYPO3后端:搜索自定义记录(TYPO3 backend: search custom records)

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

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

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

是否有任何特殊配置我必须在我的tca中添加以使此表单与我的自定义记录一起使用?

编辑 :这似乎是更新到TYPO3 4.6后发生。 在以前的4.3.3版本中,它起作用。

谢谢。

I developed an extension which allows creation of new records.

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

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

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

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

Thanks.

最满意答案

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

$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

有官方资料何时以及为何改变

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', ), );

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

There's official information when and why it was changed

更多推荐

本文发布于:2023-08-05 00:42:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1423423.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:自定义   后端   backend   records   custom

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!