{"type":"rich","version":"1.0","provider_name":"phorkie","provider_url":"https:\/\/p.cweiske.de\/","title":"TYPO3 backend: hide content element preview title header header_layout","author_name":"Christian Weiske","cache_age":86400,"width":900,"height":900,"html":"<!-- embedding all files of https:\/\/p.cweiske.de\/487 -->\n<link rel=\"stylesheet\" href=\"https:\/\/p.cweiske.de\/css\/embed.css\"\/>\n<div class=\"phork\" id=\"487\">\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.php .de1, .php .de2 {font: normal normal 1em\/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;}\n.php  {font-family:monospace;}\n.php .imp {font-weight: bold; color: red;}\n.php li, .php .li1 {color: #DDD;}\n.php .ln {width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;}\n.php .kw1 {color: #b1b100;}\n.php .kw2 {color: #000000; font-weight: bold;}\n.php .kw3 {color: #990000;}\n.php .kw4 {color: #009900; font-weight: bold;}\n.php .co1 {color: #666666; font-style: italic;}\n.php .co2 {color: #666666; font-style: italic;}\n.php .co3 {color: #0000cc; font-style: italic;}\n.php .co4 {color: #009933; font-style: italic;}\n.php .coMULTI {color: #666666; font-style: italic;}\n.php .es0 {color: #000099; font-weight: bold;}\n.php .es1 {color: #000099; font-weight: bold;}\n.php .es2 {color: #660099; font-weight: bold;}\n.php .es3 {color: #660099; font-weight: bold;}\n.php .es4 {color: #006699; font-weight: bold;}\n.php .es5 {color: #006699; font-weight: bold; font-style: italic;}\n.php .es6 {color: #009933; font-weight: bold;}\n.php .es_h {color: #000099; font-weight: bold;}\n.php .br0 {color: #009900;}\n.php .sy0 {color: #339933;}\n.php .sy1 {color: #000000; font-weight: bold;}\n.php .st0 {color: #0000ff;}\n.php .st_h {color: #0000ff;}\n.php .nu0 {color: #cc66cc;}\n.php .nu8 {color: #208080;}\n.php .nu12 {color: #208080;}\n.php .nu19 {color:#800080;}\n.php .me1 {color: #004000;}\n.php .me2 {color: #004000;}\n.php .re0 {color: #000088;}\n.php span.xtra { display:block; }\n<\/style><div class=\"code\"><table class=\"php\"><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\n<\/pre><\/td><td class=\"de1\"><pre class=\"de1\"><span class=\"kw2\">&lt;?php<\/span>\n<span class=\"kw2\">namespace<\/span> Example\\Together\\Typo3<span class=\"sy0\">;<\/span>\n&#160;\n<span class=\"kw2\">use<\/span> TYPO3\\CMS\\Backend\\View\\PageLayoutViewDrawItemHookInterface<span class=\"sy0\">;<\/span>\n&#160;\n<span class=\"co4\">\/**<\/span>\n<span class=\"co4\">&#160;* Modify the content preview rendering in the backend.<\/span>\n<span class=\"co4\">&#160;* Remove the content element header and header_layout rendering.<\/span>\n<span class=\"co4\">&#160;*<\/span>\n<span class=\"co4\">&#160;* @author Christian Weiske &lt;weiske@mogic.com&gt;<\/span>\n<span class=\"co4\">&#160;*\/<\/span>\n<span class=\"kw2\">class<\/span> HideContentHeader <span class=\"kw2\">implements<\/span> PageLayoutViewDrawItemHookInterface\n<span class=\"br0\">&#123;<\/span>\n&#160; &#160; <span class=\"co4\">\/**<\/span>\n<span class=\"co4\">&#160; &#160; &#160;* Remove &quot;header&quot; and &quot;header_layout&quot; in the backend content preview.<\/span>\n<span class=\"co4\">&#160; &#160; &#160;*<\/span>\n<span class=\"co4\">&#160; &#160; &#160;* @param object $parentObject &#160;Calling parent object<\/span>\n<span class=\"co4\">&#160; &#160; &#160;* @param bool &#160; $drawItem &#160; &#160; &#160;Whether to draw the item using the<\/span>\n<span class=\"co4\">&#160; &#160; &#160;* &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;default functionalities<\/span>\n<span class=\"co4\">&#160; &#160; &#160;* @param string $headerContent Header content<\/span>\n<span class=\"co4\">&#160; &#160; &#160;* @param string $itemContent &#160; Item content<\/span>\n<span class=\"co4\">&#160; &#160; &#160;* @param array &#160;$row &#160; &#160; &#160; &#160; &#160; Record row of tt_content<\/span>\n<span class=\"co4\">&#160; &#160; &#160;*<\/span>\n<span class=\"co4\">&#160; &#160; &#160;* @return void<\/span>\n<span class=\"co4\">&#160; &#160; &#160;*\/<\/span>\n&#160; &#160; <span class=\"kw2\">public<\/span> <span class=\"kw2\">function<\/span> preProcess<span class=\"br0\">&#40;<\/span>\n&#160; &#160; &#160; &#160; \\TYPO3\\CMS\\Backend\\View\\PageLayoutView <span class=\"sy0\">&amp;<\/span><span class=\"re0\">$parentObject<\/span><span class=\"sy0\">,<\/span>\n&#160; &#160; &#160; &#160; <span class=\"sy0\">&amp;<\/span><span class=\"re0\">$drawItem<\/span><span class=\"sy0\">,<\/span> <span class=\"sy0\">&amp;<\/span><span class=\"re0\">$headerContent<\/span><span class=\"sy0\">,<\/span> <span class=\"sy0\">&amp;<\/span><span class=\"re0\">$itemContent<\/span><span class=\"sy0\">,<\/span> <a href=\"http:\/\/www.php.net\/array\"><span class=\"kw3\">array<\/span><\/a> <span class=\"sy0\">&amp;<\/span><span class=\"re0\">$row<\/span>\n&#160; &#160; <span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span>\n&#160; &#160; &#160; &#160; <span class=\"kw1\">if<\/span> <span class=\"br0\">&#40;<\/span><span class=\"re0\">$row<\/span><span class=\"br0\">&#91;<\/span><span class=\"st_h\">'CType'<\/span><span class=\"br0\">&#93;<\/span> <span class=\"sy0\">==<\/span> <span class=\"st_h\">'fluidcontent_content'<\/span><span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span>\n&#160; &#160; &#160; &#160; &#160; &#160; <span class=\"re0\">$headerContent<\/span> <span class=\"sy0\">=<\/span> <span class=\"st_h\">''<\/span><span class=\"sy0\">;<\/span>\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<span class=\"sy1\">?&gt;<\/span>\n&#160;<\/pre><\/td><\/tr><\/tbody><\/table><\/div>\n <\/div>\n <div class=\"phork-meta\">\n  <a href=\"https:\/\/p.cweiske.de\/487\/rev-raw\/3258b758bab4d8eac9c28bb247f4cf38ef28d805\/Classes\/Typo3\/HideContentHeader.php\" style=\"float: right\">view raw source<\/a>\n  <a href=\"https:\/\/p.cweiske.de\/487#Classes\/Typo3\/HideContentHeader.php\">Classes\/Typo3\/HideContentHeader.php<\/a>\n <\/div>\n<\/div>\n    <div class=\"phork-file\">\n <div class=\"phork-content\">\n  \n<div class=\"document\">\n\n\n<p><a class=\"reference external\" href=\"https:\/\/stmllr.net\/blog\/customizing-preview-widgets-in-the-typo3-page-module\/\">https:\/\/stmllr.net\/blog\/customizing-preview-widgets-in-the-typo3-page-module\/<\/a><\/p>\n<\/div>\n\n <\/div>\n <div class=\"phork-meta\">\n  <a href=\"https:\/\/p.cweiske.de\/487\/rev-raw\/3258b758bab4d8eac9c28bb247f4cf38ef28d805\/README.rst\" style=\"float: right\">view raw source<\/a>\n  <a href=\"https:\/\/p.cweiske.de\/487#README.rst\">README.rst<\/a>\n <\/div>\n<\/div>\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.php .de1, .php .de2 {font: normal normal 1em\/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;}\n.php  {font-family:monospace;}\n.php .imp {font-weight: bold; color: red;}\n.php li, .php .li1 {color: #DDD;}\n.php .ln {width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;}\n.php .kw1 {color: #b1b100;}\n.php .kw2 {color: #000000; font-weight: bold;}\n.php .kw3 {color: #990000;}\n.php .kw4 {color: #009900; font-weight: bold;}\n.php .co1 {color: #666666; font-style: italic;}\n.php .co2 {color: #666666; font-style: italic;}\n.php .co3 {color: #0000cc; font-style: italic;}\n.php .co4 {color: #009933; font-style: italic;}\n.php .coMULTI {color: #666666; font-style: italic;}\n.php .es0 {color: #000099; font-weight: bold;}\n.php .es1 {color: #000099; font-weight: bold;}\n.php .es2 {color: #660099; font-weight: bold;}\n.php .es3 {color: #660099; font-weight: bold;}\n.php .es4 {color: #006699; font-weight: bold;}\n.php .es5 {color: #006699; font-weight: bold; font-style: italic;}\n.php .es6 {color: #009933; font-weight: bold;}\n.php .es_h {color: #000099; font-weight: bold;}\n.php .br0 {color: #009900;}\n.php .sy0 {color: #339933;}\n.php .sy1 {color: #000000; font-weight: bold;}\n.php .st0 {color: #0000ff;}\n.php .st_h {color: #0000ff;}\n.php .nu0 {color: #cc66cc;}\n.php .nu8 {color: #208080;}\n.php .nu12 {color: #208080;}\n.php .nu19 {color:#800080;}\n.php .me1 {color: #004000;}\n.php .me2 {color: #004000;}\n.php .re0 {color: #000088;}\n.php span.xtra { display:block; }\n<\/style><div class=\"code\"><table class=\"php\"><tbody><tr class=\"li1\"><td class=\"ln\"><pre class=\"de1\">1\n2\n3\n4\n5\n<\/pre><\/td><td class=\"de1\"><pre class=\"de1\"><span class=\"kw2\">&lt;?php<\/span>\n<span class=\"co2\">#hide content header in backend preview<\/span>\n<span class=\"re0\">$GLOBALS<\/span><span class=\"br0\">&#91;<\/span><span class=\"st_h\">'TYPO3_CONF_VARS'<\/span><span class=\"br0\">&#93;<\/span><span class=\"br0\">&#91;<\/span><span class=\"st_h\">'SC_OPTIONS'<\/span><span class=\"br0\">&#93;<\/span><span class=\"br0\">&#91;<\/span><span class=\"st_h\">'cms\/layout\/class.tx_cms_layout.php'<\/span><span class=\"br0\">&#93;<\/span><span class=\"br0\">&#91;<\/span><span class=\"st_h\">'tt_content_drawItem'<\/span><span class=\"br0\">&#93;<\/span><span class=\"br0\">&#91;<\/span><span class=\"st_h\">'together'<\/span><span class=\"br0\">&#93;<\/span>\n&#160; &#160; <span class=\"sy0\">=<\/span> <span class=\"st_h\">'Example\\\\Together\\\\Typo3\\\\HideContentHeader'<\/span><span class=\"sy0\">;<\/span>\n&#160;<\/pre><\/td><\/tr><\/tbody><\/table><\/div>\n <\/div>\n <div class=\"phork-meta\">\n  <a href=\"https:\/\/p.cweiske.de\/487\/rev-raw\/3258b758bab4d8eac9c28bb247f4cf38ef28d805\/ext_localconf.php\" style=\"float: right\">view raw source<\/a>\n  <a href=\"https:\/\/p.cweiske.de\/487#ext_localconf.php\">ext_localconf.php<\/a>\n <\/div>\n<\/div>\n<\/div>\n"}
