[TASK] Add contentelement user func and page config
This commit is contained in:
parent
a76a88c289
commit
ba69f3d330
28
Classes/UserFunc/RenderContentelement.php
Normal file
28
Classes/UserFunc/RenderContentelement.php
Normal 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
|
||||||
|
]));
|
||||||
|
}
|
||||||
|
}
|
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user