简体   繁体   English

Typo3中的自定义记录

[英]Custom records in Typo3

I'm using Typo3 6.1 with a custom made Fluid template. 我正在使用Typo3 6.1和定制的Fluid模板。 I'd be perfectly happy with the default page editor, if it had a simple way to add fields for custom records (if you know Wordpress, think of its custom fields). 如果默认页面编辑器具有添加自定义记录字段的简单方法(如果您知道Wordpress,请考虑一下它的自定义字段),那么我将对默认页面编辑器感到非常满意。 I did a lot of research, but ultimately I always came across a solution that outdated and no longer compatible with Typo3 6.x versions. 我做了很多研究,但最终我总是遇到一个过时且不再与Typo3 6.x版本兼容的解决方案。 More specifically, that solution was an extension called Kickstarter. 更具体地说,该解决方案是名为Kickstarter的扩展。 If I got that right, that was replaced by another extension, which has been renamed at least once. 如果我没做错,那将被另一个扩展名替换,该扩展名至少已重命名一次。 That makes it rather difficult to find good information on that. 这使得很难找到关于此的良好信息。 (Not to mention the bad English used in Typo3's Wiki) (更不用说在Typo3的Wiki中使用的英语不好)

Anyway, here's what I'm trying to achieve. 无论如何,这就是我想要达到的目标。 When creating a page, I'd like to maintain the standard RichText editor, but also have the option to add URLs to images (or maybe, later, other extra-information). 创建页面时,我想维护标准的RichText编辑器,但也可以选择向图像添加URL(或者以后再添加其他信息)。 Ideally, these custom records would be extendable, but a multiline text-field would probably be good enough. 理想情况下,这些自定义记录可以扩展,但是多行文本字段可能就足够了。

What would be the easiest solution to modify the backend editor to suit my needs and how can I access the stored information in my Fluid template? 修改后端编辑器以满足我的需求的最简单解决方案是什么?如何访问Fluid模板中存储的信息?

For starters you should familiarize a bit more with the default content elements, I think what you are trying to do could be possible with the content element text+images and the use of the images tab. 对于初学者,您应该对默认的内容元素有所了解,我认为您可以尝试通过内容元素text + images和使用images选项卡来实现。

It will however always be possible that this isn't enough, then creating an own extension will be the way to go. 但是,这总有可能是不够的,那么创建自己的扩展名是必经之路。 The old kickstarter has been replaced with the extension builder (extension key extension_builder) and will propably help you get started. 旧的kickstarter已被扩展构建器(扩展密钥extension_builder)取代,将有助您入门。 Unfortunately documentation for own extensions are mostly outdated and even then not very clear. 不幸的是,关于自己的扩展的文档大多已经过时,甚至那时还不是很清楚。 You'll have to dig through a lot of info on the web to get things worked out. 您必须在网络上挖掘大量信息才能解决问题。

A few pointers for example code and tutorials I have come across: 我遇到的一些示例代码和教程的指针:

Specifically for your problem: you'll have to extend the tt_content table with a new value and provide some way to enter your new values, possibly through flexform or TCA configuration (have a look at the custom content element examples). 专门针对您的问题:您必须使用新值扩展tt_content表,并提供某种方式(可能通过flexform或TCA配置)输入新值(请参阅自定义内容元素示例)。

Hope this helps a bit, you'll sometimes have to read between the lines though. 希望这会有所帮助,尽管有时您还是必须在两行之间阅读。

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

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