简体   繁体   English

如何在面包屑WITH链接中设置tx_news(TYPO3)标题

[英]How to set tx_news (TYPO3) title in breadcrumb WITH link

I implemented tx_news title in breadcrumb always like shown here with typoscript: How to set breadcrumb for tx_news TYPO3 and it works fine but for now i need to get an link on the news title which points to itself. 我总是在面包屑中实现tx_news标题,就像在这里用错字所示: 如何为tx_news TYPO3设置面包屑 ,它工作正常,但现在我需要获得指向其自身的新闻标题的链接。 This is needed for structurel data correctness ( https://schema.org/ ). 这是结构数据正确性所必需的( https://schema.org/ )。 See structurel data testing tools on any news single view for that issue. 有关该问题,请在任何新闻视图中查看结构数据测试工具。 I didn't get that to work and don't find any hints online beside the above one. 我没有使它起作用,也没有在上面的提示旁边找到任何提示。 Is that possible in any way? 有可能吗?

What about 关于什么

lib.url = TEXT
lib.url.data = getIndpEnv:TYPO3_REQUEST_URL

Thanks for the hint. 感谢您的提示。 This did the job for me: 这为我做了工作:

[globalVar = GP:tx_news_pi1|news > 0]      
lib.menu.breadcrumb.20 = COA
lib.menu.breadcrumb.20 {
  wrap = <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem" class="active"> | <meta itemprop="position" content="2" /></li>
  10 = TEXT
  10.wrap = <a href="|" target="_top" itemprop="item">
  10.data = getIndpEnv:TYPO3_REQUEST_URL
  20 = RECORDS
  20 {
    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
    conf.tx_news_domain_model_news.htmlSpecialChars = 1
    wrap = <span itemprop="name">|</span>
  }
  30 = TEXT
  30.value = </a>
}
[end]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM