【问题标题】:TYPO3 - How to check if a news article has a certain parent category with fluidTYPO3 - 如何检查新闻文章是否具有一定的父类别和流体
【发布时间】:2018-05-27 18:42:07
【问题描述】:

如何在 m'y Fluid 模板中检查新闻文章是否具有某个父类别?

【问题讨论】:

    标签: typo3 fluid tx-news


    【解决方案1】:

    也许这会有所帮助:

    <f:for each="{newsItem.categories}" as="category">
        <f:if condition="{category.parent.uid} == theCatIdYouAreSearchingFor">
            do your stuff here...
        </f:if>
    </f:for>
    

    【讨论】:

    • 我建议&lt;f:if condition="{category.parent.uid} == theCatIdYouAreSearchingFor"&gt;,因为他要求父类别
    • 这也可以&lt;f:if condition="{newsItem.firstCategory.parentcategory.uid} == theCatIdYouAreSearchingFor"&gt;
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-10-03
    • 1970-01-01
    相关资源
    最近更新 更多