TYPO3:使用微观数据包裹breadcrum

时间:2017-03-14 16:38:53

标签: typo3 typoscript fluid extbase

我想在面包屑中包装这些微数据中的每个元素:

<div itemtype="http://data-vocabulary.org/Breadcrumb" itemscope="">
<a itemprop="url" href="/faz/frisch_deploy/master/xxx">
<span itemprop="title">Frisuren</span>
</a>
</div>

以下是我的typoscript的样子:

            NO {
                htmlSpecialChars = 1
                allWrap = <li class="lvl1">|</li> || <li class="lvl2">|</li> || <li class="lvl3">|</li> || <li class="lvl4">|</li>
                ATagTitle.field = subtitle // title
                ATagTitle.noTrimWrap = | {LLL:EXT:myext/Resources/Private/Language/locallang.xml:menu.breadcrumb.title} |
                ATagTile.insertData = 1
            }

我在typoscript引用中尝试了一些“wrap”函数,但它不起作用。

2 个答案:

答案 0 :(得分:2)

schema.org微数据的工作示例:https://schema.org/BreadcrumbList

lib.breadcrumb = COA
lib.breadcrumb {
    10 = HMENU
    10 {
        special = rootline
        special.range = 1|-1
        wrap = <ol itemscope itemtype="http://schema.org/BreadcrumbList" aria-label="breadcrumbs" class="breadcrumb">|</ol>

        1 = TMENU
        1 {
            NO = 1
            NO {
                wrapItemAndSub = <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">| </li>
                ATagParams = itemprop="item"
                stdWrap.wrap = <span itemprop="name">|</span>
                ATagBeforeWrap = 1
                allWrap = |<meta itemprop="position" content="{register:count_MENUOBJ}">
                allWrap.insertData = 1
            }
            CUR < .NO
            CUR.doNotLinkIt = 1
        }
    }
}

答案 1 :(得分:1)

看看这个页面: http://blog.undkonsorten.com/typo3-tmenu-wrap-wrapitemandsub-allwrapallstdwrap-linkwrap

根据这些提示,您应该使用{{1}}进行商品类型换行。