TYPO3: tx_news 修改新闻表格

TYPO3: tx_news modify news forms

我正在制作杂志页面。因此,我希望客户在 creating/editing 新 post 时能够 select 设计类型。所以我想向 "edit news" 添加一个自定义字段,类似于列出所有新闻(设计)类型的下拉列表。

例如:新闻类型:

等...

当客户端没有 select 任何东西时,它应该回退到默认值,即 "Normal" 并且当客户端 select 访问第二个输入字段时也很好出现在他可以输入人员 profession/description.

的地方

我的目标是,在流畅的模板中,我可以添加一行,其中 selected 新闻类型将作为 class 添加到列表项中,例如:

<div class="news-item {newsItem.type}"> 
// some code
</div>

will render out as:

<div class="news-item interview">
// some code
<div>

我不太确定我必须将什么添加到我用来实现该目的的自定义扩展中。

感谢所有帮助。

您需要使用更多字段扩展新闻数据。 manual and this blog(ext:news is extended, but filestructure is old) and this article(当前字段结构,但其他表已增强)中对此进行了描述。

为了评估和显示您的字段,您需要修改 ext:news 的模板。将必要的部分复制到您的扩展中并对其进行修改。
同时设置打字错误以包含您的模板,如 manual.

中所述