[TASK] Add contentelement user func and page config

This commit is contained in:
Philipp Dieter 2020-04-02 20:17:56 +02:00
parent a76a88c289
commit ba69f3d330
2 changed files with 44 additions and 0 deletions

View File

@ -0,0 +1,28 @@
<?php
namespace Cjel\TemplatesAide\UserFunc;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Extbase\Object\ObjectManager;
use TYPO3\CMS\Frontend\ContentObject\RecordsContentObject;
class RenderContentelement
{
/**
*/
public function render()
{
$cid = GeneralUtility::_GP('cid');
$this->objectManager = GeneralUtility::makeInstance(
ObjectManager::class
);
return trim($this->objectManager->get(
RecordsContentObject::class
)->render([
'tables' => 'tt_content',
'source' => $cid,
'dontCheckPid' => 1
]));
}
}

View File

@ -23,3 +23,19 @@ page {
file01.external = 1 file01.external = 1
} }
} }
pageContentelement = PAGE
pageContentelement {
typeNum = 5000
10 = USER_INT
10 {
userFunc = Cjel\TemplatesAide\UserFunc\RenderContentelement->render
}
config {
disableAllHeaderCode = 1
xhtml_cleaning = 0
admPanel = 0
debug = 0
no_cache = 1
}
}