抱歉,开箱即用是不可能的。新闻记录不是真实的页面,因此必须添加一些不同的内容。
不要使用 viewhelper,而是使用这个 TS 代码
lib.navigation_breadcrumb = COA
lib.navigation_breadcrumb {
stdWrap.wrap = <ol class="breadcrumb">|</ol>
10 = HMENU
10 {
special = rootline
#special.range = 1
1 = TMENU
1 {
noBlur = 1
NO = 1
NO {
wrapItemAndSub = <li>|</li>
ATagTitle.field = subtitle // title
stdWrap.htmlSpecialChars = 1
}
CUR <.NO
CUR {
wrapItemAndSub = <li class="active">|</li>
doNotLinkIt = 1
}
}
}
# Add news title if on single view
20 = RECORDS
20 {
if.isTrue.data = GP:tx_news_pi1|news
dontCheckPid = 1
tables = tx_news_domain_model_news
source.data = GP:tx_news_pi1|news
source.intval = 1
conf.tx_news_domain_model_news = TEXT
conf.tx_news_domain_model_news {
field = title
htmlSpecialChars = 1
}
wrap = <li>|</li>
}
}
并通过使用包含它<f:cObject typoscriptObjectPath="lib.navigation_breadcrumb" />