{"type":"rich","version":"1.0","provider_name":"phorkie","provider_url":"https:\/\/p.cweiske.de\/","title":"TYPO3 v11 + schema extension: NewsArticle JSON-LD data via TypoScript","author_name":"Christian Weiske","cache_age":86400,"width":900,"height":900,"html":"<!-- embedding all files of https:\/\/p.cweiske.de\/917 -->\n<link rel=\"stylesheet\" href=\"https:\/\/p.cweiske.de\/css\/embed.css\"\/>\n<div class=\"phork\" id=\"917\">\n    <div class=\"phork-file\">\n <div class=\"phork-content\">\n  <style type=\"text\/css\">\/**\n * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2014 Benny Baumann\n * (http:\/\/qbnz.com\/highlighter\/ and http:\/\/geshi.org\/)\n *\/\n.typoscript .de1, .typoscript .de2 {font: normal normal 1em\/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;}\n.typoscript  {font-family:monospace;}\n.typoscript .imp {font-weight: bold; color: red;}\n.typoscript li, .typoscript .li1 {color: #DDD;}\n.typoscript .ln {width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;}\n.typoscript .kw1 {color: #ed7d14;}\n.typoscript .kw2 {font-weight: bold;}\n.typoscript .kw3 {color: #990000; font-weight: bold;}\n.typoscript .kw4 {color: #990000; font-weight: bold;}\n.typoscript .kw5 {color: #990000; font-weight: bold;}\n.typoscript .kw6 {color: #990000; font-weight: bold;}\n.typoscript .kw7 {color: #990000; font-weight: bold;}\n.typoscript .kw8 {font-weight: bold;}\n.typoscript .kw9 {color: #990000; font-weight: bold;}\n.typoscript .co1 {color: #aaa; font-style: italic;}\n.typoscript .co2 {color: #aaa; font-style: italic;}\n.typoscript .coMULTI {color: #aaa; font-style: italic;}\n.typoscript .br0 {color: #009900;}\n.typoscript .sy0 {color: #339933; font-weight: bold;}\n.typoscript .sy1 {color: #009900; font-weight: bold;}\n.typoscript .st0 {color: #ac14aa;}\n.typoscript .nu0 {color: #cc0000;}\n.typoscript .me1 {color: #0000e0; font-weight: bold;}\n.typoscript .me2 {color: #0000e0; font-weight: bold;}\n.typoscript .re0 {color: #009900;}\n.typoscript .re1 {color: #009900; font-weight: bold;}\n.typoscript .re2 {color: #3366CC;}\n.typoscript .re3 {color: #000066; font-weight: bold;}\n.typoscript .re4 {color: #ed7d14;}\n.typoscript .re5 {color: #000066; font-weight: bold;}\n.typoscript .re6 {color: #009900;}\n.typoscript .re7 {color: #3366CC;}\n.typoscript span.xtra { display:block; }\n<\/style><div class=\"code\"><table class=\"typoscript\"><tbody><tr class=\"li1\"><td class=\"ln\"><pre class=\"de1\">1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71\n72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n<\/pre><\/td><td class=\"de1\"><pre class=\"de1\"><span class=\"re5\">page<\/span><span class=\"sy0\">.<\/span>90 <span class=\"sy0\">=<\/span> SCHEMA\n<span class=\"re5\">page<\/span><span class=\"sy0\">.<\/span>90 <span class=\"br0\">&#123;<\/span>\n&#160; &#160; <span class=\"re7\">#add<\/span> schema only for pages with type &quot;article&quot;\n&#160; &#160; <a href=\"http:\/\/documentation.typo3.org\/documentation\/tsref\/functions\/if\/\"><span class=\"kw2\">if<\/span><\/a><span class=\"sy0\">.<\/span>equals<span class=\"sy0\">.<\/span>field <span class=\"sy0\">=<\/span> doktype\n&#160; &#160; <a href=\"http:\/\/documentation.typo3.org\/documentation\/tsref\/functions\/if\/\"><span class=\"kw2\">if<\/span><\/a><span class=\"sy0\">.<\/span>value <span class=\"sy0\">=<\/span> <span class=\"nu0\">12<\/span>\n&#160;\n&#160; &#160; type<span class=\"sy0\">.<\/span>field <span class=\"sy0\">=<\/span> <span class=\"re3\">tx_schema_webpagetype<\/span>\n&#160;\n&#160; &#160; properties <span class=\"br0\">&#123;<\/span>\n&#160; &#160; &#160; &#160; mainEntityOfPage <span class=\"sy0\">=<\/span> SCHEMA\n&#160; &#160; &#160; &#160; mainEntityOfPage <span class=\"br0\">&#123;<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; type <span class=\"sy0\">=<\/span> WebPage\n&#160; &#160; &#160; &#160; &#160; &#160; id<span class=\"sy0\">.<\/span>data <span class=\"sy0\">=<\/span> getIndpEnv <span class=\"sy0\">:<\/span> TYPO3_REQUEST_URL\n&#160; &#160; &#160; &#160; <span class=\"br0\">&#125;<\/span>\n&#160;\n&#160; &#160; &#160; &#160; headline<span class=\"sy0\">.<\/span>field <span class=\"sy0\">=<\/span> seo_title <span class=\"co1\">\/\/ title<\/span>\n&#160;\n&#160; &#160; &#160; &#160; image <span class=\"sy0\">=<\/span> SCHEMA\n&#160; &#160; &#160; &#160; image <span class=\"br0\">&#123;<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; type <span class=\"sy0\">=<\/span> ImageObject\n&#160; &#160; &#160; &#160; &#160; &#160; properties <span class=\"br0\">&#123;<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span class=\"co2\">#take image URL from page properties &gt; ressources &gt; media<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; url<span class=\"sy0\">.<\/span>cObject <span class=\"sy0\">=<\/span> FILES\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; url<span class=\"sy0\">.<\/span>cObject <span class=\"br0\">&#123;<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; references <span class=\"br0\">&#123;<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; table <span class=\"sy0\">=<\/span> pages\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; uid<span class=\"sy0\">.<\/span>data <span class=\"sy0\">=<\/span> uid\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; fieldName <span class=\"sy0\">=<\/span> media\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span class=\"br0\">&#125;<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <a href=\"http:\/\/documentation.typo3.org\/documentation\/tsref\/menu\/common-properties\/\"><span class=\"kw8\">maxItems<\/span><\/a> <span class=\"sy0\">=<\/span> <span class=\"nu0\">1<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; renderObj <span class=\"sy0\">=<\/span> <a href=\"http:\/\/documentation.typo3.org\/documentation\/tsref\/cobjects\/TEXT\/\"><span class=\"kw4\">TEXT<\/span><\/a>\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; renderObj <span class=\"br0\">&#123;<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; data <span class=\"sy0\">=<\/span> <span class=\"re5\">file<\/span><span class=\"sy0\">:<\/span>current<span class=\"sy0\">:<\/span>publicUrl\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span class=\"br0\">&#125;<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span class=\"br0\">&#125;<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; <span class=\"br0\">&#125;<\/span>\n&#160; &#160; &#160; &#160; <span class=\"br0\">&#125;<\/span>\n&#160;\n&#160; &#160; &#160; &#160; <span class=\"co2\">#authors are special pages, linked via the &quot;tx_ratgeber2_author_pid&quot; field<\/span>\n&#160; &#160; &#160; &#160; author <span class=\"sy0\">=<\/span> SCHEMA\n&#160; &#160; &#160; &#160; author <span class=\"br0\">&#123;<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; type <span class=\"sy0\">=<\/span> Person\n&#160; &#160; &#160; &#160; &#160; &#160; properties <span class=\"br0\">&#123;<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; name<span class=\"sy0\">.<\/span>cObject <span class=\"sy0\">=<\/span> <a href=\"http:\/\/documentation.typo3.org\/documentation\/tsref\/cobjects\/RECORDS\/\"><span class=\"kw4\">RECORDS<\/span><\/a>\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; name<span class=\"sy0\">.<\/span>cObject <span class=\"br0\">&#123;<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; source<span class=\"sy0\">.<\/span>data <span class=\"sy0\">=<\/span> <span class=\"re5\">page<\/span><span class=\"sy0\">:<\/span><span class=\"re3\">tx_ratgeber2_author_pid<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; tables <span class=\"sy0\">=<\/span> pages\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; conf<span class=\"sy0\">.<\/span>pages <span class=\"sy0\">=<\/span> <a href=\"http:\/\/documentation.typo3.org\/documentation\/tsref\/cobjects\/TEXT\/\"><span class=\"kw4\">TEXT<\/span><\/a>\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; conf<span class=\"sy0\">.<\/span>pages<span class=\"sy0\">.<\/span><a href=\"http:\/\/documentation.typo3.org\/documentation\/tsref\/functions\/stdWrap\/\"><span class=\"kw2\">stdWrap<\/span><\/a><span class=\"sy0\">.<\/span>field <span class=\"sy0\">=<\/span> title\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span class=\"br0\">&#125;<\/span>\n&#160;\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; url<span class=\"sy0\">.<\/span><a href=\"http:\/\/documentation.typo3.org\/documentation\/tsref\/functions\/typolink\/\"><span class=\"kw2\">typolink<\/span><\/a> <span class=\"br0\">&#123;<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; parameter<span class=\"sy0\">.<\/span>field <span class=\"sy0\">=<\/span> <span class=\"re3\">tx_ratgeber2_author_pid<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; forceAbsoluteUrl <span class=\"sy0\">=<\/span> <span class=\"nu0\">1<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; returnLast <span class=\"sy0\">=<\/span> url\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span class=\"br0\">&#125;<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; <span class=\"br0\">&#125;<\/span>\n&#160; &#160; &#160; &#160; <span class=\"br0\">&#125;<\/span>\n&#160;\n&#160; &#160; &#160; &#160; publisher <span class=\"sy0\">=<\/span> SCHEMA\n&#160; &#160; &#160; &#160; publisher <span class=\"br0\">&#123;<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; type <span class=\"sy0\">=<\/span> Organization\n&#160; &#160; &#160; &#160; &#160; &#160; properties <span class=\"br0\">&#123;<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; name <span class=\"sy0\">=<\/span> ACME Corp\n&#160;\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; logo <span class=\"sy0\">=<\/span> SCHEMA\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; logo <span class=\"br0\">&#123;<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; type <span class=\"sy0\">=<\/span> ImageObject\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; properties <span class=\"br0\">&#123;<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; url <span class=\"sy0\">=<\/span> https<span class=\"sy0\">:<\/span><span class=\"co1\">\/\/example.org\/acme.svg<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span class=\"br0\">&#125;<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span class=\"br0\">&#125;<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; <span class=\"br0\">&#125;<\/span>\n&#160; &#160; &#160; &#160; <span class=\"br0\">&#125;<\/span>\n&#160;\n&#160; &#160; &#160; &#160; datePublished <span class=\"br0\">&#123;<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; data <span class=\"sy0\">=<\/span> <span class=\"re5\">field<\/span><span class=\"sy0\">:<\/span><span class=\"re3\">tx_ratgeber2_publication_date<\/span> <span class=\"co1\">\/\/ field:crdate<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; date <span class=\"sy0\">=<\/span> c\n&#160; &#160; &#160; &#160; <span class=\"br0\">&#125;<\/span>\n&#160;\n&#160; &#160; &#160; &#160; dateModified <span class=\"br0\">&#123;<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; data <span class=\"sy0\">=<\/span> <span class=\"re5\">field<\/span><span class=\"sy0\">:<\/span>lastUpdated <span class=\"co1\">\/\/ field:tx_ratgeber2_publication_date \/\/ field:crdate<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; date <span class=\"sy0\">=<\/span> c\n&#160; &#160; &#160; &#160; <span class=\"br0\">&#125;<\/span>\n&#160; &#160; <span class=\"br0\">&#125;<\/span>\n<span class=\"br0\">&#125;<\/span>\n&#160;<\/pre><\/td><\/tr><\/tbody><\/table><\/div>\n <\/div>\n <div class=\"phork-meta\">\n  <a href=\"https:\/\/p.cweiske.de\/917\/rev-raw\/eee8e358b3427bfea8a0437196719e082b2dd6c8\/page-article.typoscript\" style=\"float: right\">view raw source<\/a>\n  <a href=\"https:\/\/p.cweiske.de\/917#page-article.typoscript\">page-article.typoscript<\/a>\n <\/div>\n<\/div>\n<\/div>\n"}
