Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Typo3 类型3如何获取子类别的父类别_Typo3_Categories_Extbase_Tx News - Fatal编程技术网

Typo3 类型3如何获取子类别的父类别

Typo3 类型3如何获取子类别的父类别,typo3,categories,extbase,tx-news,Typo3,Categories,Extbase,Tx News,我有打字3(7.6.10)和tx_新闻(新闻管理) 我创建了一个包含新闻列表的页面。 我需要知道子类别的父类别(因为我需要设置页面标题的样式) 我该怎么做? GeorgRinger\News\Domain\Model\Category(tx\u News)具有属性parentcategory TYPO3\CMS\Extbase\Domain\Model\Category(核心)具有属性parent 如果要使用fluid在新闻模板中显示父类别的标题,可以执行以下操作: <f:if cond

我有打字3(7.6.10)和tx_新闻(新闻管理) 我创建了一个包含新闻列表的页面。 我需要知道子类别的父类别(因为我需要设置页面标题的样式)

我该怎么做?

  • GeorgRinger\News\Domain\Model\Category
    (tx\u News)具有属性
    parentcategory
  • TYPO3\CMS\Extbase\Domain\Model\Category
    (核心)具有属性
    parent
如果要使用fluid在新闻模板中显示父类别的标题,可以执行以下操作:

<f:if condition="{newsItem.firstCategory.parentcategory}">
  <f:then>{newsItem.firstCategory.parentcategory.title}</f:then>
  <f:else>{newsItem.firstCategory.title}</f:else>
</f:if>

{newsItem.firstCategory.parentcategory.title}
{newsItem.firstCategory.title}

有没有一种方法可以让变量overwritemand并将其传递到页面,然后获取父类别?(可能使用tsconfig)您处于前端还是后端环境中(因为tsconfig基本上是后端)?您要解析的类别是绑定到新闻实体还是绑定到页面?如果是页面,是哪个页面,包含呈现新闻实体的插件的页面,还是使用存储文件夹存储新闻的页面?上下文是:前端。这是一页。我希望通过url通过插件传递类别的父类别,我认为是:[OverwritedMand][categories]=x页面包含呈现新闻实体的插件。