1

I'm using TYPO3 and News System and Bootstrap Package.

I see the opengraph tags twice. One of the news and one of page. How i can resolve it?

Georg Ringer
  • 7,779
  • 1
  • 16
  • 34
MarioProject
  • 417
  • 4
  • 25

2 Answers2

6

You need to exclude the opengraph of the bootstrap package when being on a news detail page. Then you only get it once.

Put this into your TypoScript

[globalVar = GP:tx_news_pi1|news > 0]
    page.meta.og:title >
    page.meta.og:site_name > 
    page.meta.og:description > 
    page.meta.og:image >    
[global]
Georg Ringer
  • 7,779
  • 1
  • 16
  • 34
  • Thank you for youw answer. How can i do that? – MarioProject Sep 20 '16 at 12:08
  • Can i ask you where i can find a good documentaion about the sintax? For Example: " page.meta.og:title > " exclude the tag but i don't undertarnd why and if i want change the og:title? I think i have to write "page.meta.og:title = something" but it doesn't work. I tried to find the documentation but i found different syntax. Sorry, excuse ignorance – MarioProject Sep 21 '16 at 07:50
  • this can be found at https://docs.typo3.org/typo3cms/TyposcriptReference/Setup/Meta/Index.html. just use "docs typo3 page meta" in google – Georg Ringer Sep 21 '16 at 07:51
  • yes i read it. But when i write "page.meta.og:title = something i want" the page show the page title and not 'something i want' – MarioProject Sep 21 '16 at 08:03
  • 1
    you can always use the TypoScript Object Brower to check the final values of your TS. Additionally use "page.meta.og:title >" before your declaration to clear any properties set before – Georg Ringer Sep 22 '16 at 06:03
1

Thank you Georg for the hint. For TYPO3 version 9 you should use new typoscript condition syntax:

// Prevent bootstrap_package og:attributes for single view
[(request.getQueryParams()['tx_news_pi1'])['news'] > 0]
    page.meta.og:title >
    page.meta.og:site_name >
    page.meta.og:description >
    page.meta.og:image >
[end]
jokumer
  • 2,249
  • 11
  • 22