代码之家  ›  专栏  ›  技术社区  ›  Yamen Nassif

typo3自定义内容,带2个标题

  •  0
  • Yamen Nassif  · 技术社区  · 7 年前

    我正在尝试创建一个新的 content element (不确定它的名字是否正确)我想达到这样的目的

    标题\1

    标题\2

    正文文本

    在我的tt_content.php文件中,我有以下内容:

    'showitem' => '
              --div--;Intro,
                 --palette--;LLL:EXT:/path/to/locallang_ttc.xlf:palette.general;
                 general,
                 header,
                 bodytext,
                 module_background_color,
                 --palette--;;cta,
    

    我试着加上这样的东西

    'showitem' => '
              --div--;Intro,
                 --palette--;LLL:EXT:/path/to/locallang_ttc.xlf:palette.general;
                 general,
                 header,
                 header,
                 bodytext,
                 module_background_color,
                 --palette--;;cta,
    

    或者这个

    'showitem' => '
              --div--;Intro,
                 --palette--;LLL:EXT:/path/to/locallang_ttc.xlf:palette.general;
                 general,
                 header,
                 bodytext,
                 bodytext,
                 module_background_color,
                 --palette--;;cta,
    

    这两个都不起作用,我只能得到一个标题和一个正文,我对这个太陌生了,不知何故我需要这样做。

    另外,我不能通过一个标题来完成,因为每个标题都有自己的样式。 谢谢

    1 回复  |  直到 7 年前
        1
  •  1
  •   René Pflamm    7 年前

    一列只能使用一次!

    看看 header 元素。在这里,您可以看到一个名为 subheader .

    所以下面应该添加另一个标题列:

    'showitem' => '
              --div--;Intro,
                 --palette--;LLL:EXT:/path/to/locallang_ttc.xlf:palette.general;
                 general,
                 header,
                 subheader,
                 bodytext,
                 module_background_color,
                 --palette--;;cta,