Mal eine Frage:
Ich kriege in Extbase über ein Objekt
mittels
$this->renderer->assign("content", $story->getContentcolumn());
eine kommaseperierte Liste an uids tt_content einträgem an einen dieser View Helper von Fluid
In Fluid sieht es so aus.
<f:cObject typoscriptObjectPath="lib.Stories.getContent" data="{content}" />
Im TS habe ich dann folgende LIB geschrieben.
lib.Stories.getContent = COA
lib.Stories.getContent {
10 = RECORDS
10.tables = tt_content
10.source.current = 1
10.conf.tt_content = COA
10.conf.tt_content {
10 = TEXT
10.field = bodytext
}
}
Das Problem wenn ich das einbinde kriege ich nur eine leere Seite er gibt mir dann garnichts mehr aus der Extension bzw dem Fluid Templates aus.
Das betrifft aber nur CONTENT und RECORDS was ich bisher festgestellt habe, andere cObjekte gehen dagegen einwandfrei.
Erst wenn ich das TS Objekt mit 10 > wieder lösche kriege ich wieder einen OutPut.
Was mache ich falsch ?
Ich habe das etwas anders gelöst - dem View wird ein array aus tt_content uids übergeben.
Mit Foreach dann jede UID durchgehen und über einen Viewhelper denn die CE holen - z.B.:
<?php
/**
* Shows Content Element
*
* @package TYPO3
* @subpackage Fluid
*/
class Tx_Powermail_ViewHelpers_Misc_ContentElementViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
/**
* @var Tx_Extbase_Configuration_ConfigurationManagerInterface
*/
protected $configurationManager;
/**
* @var Content Object
*/
protected $cObj;
/**
* Parse a content element
*
* @param int UID of any content element
* @return string Parsed Content Element
*/
public function render($uid) {
$conf = array( // config
'tables' => 'tt_content',
'source' => $uid,
'dontCheckPid' => 1
);
return $this->cObj->RECORDS($conf);
}
/**
* Injects the Configuration Manager
*
* @param Tx_Extbase_Configuration_ConfigurationManagerInterface $configurationManager
* @return void
*/
public function injectConfigurationManager(Tx_Extbase_Configuration_ConfigurationManagerInterface $configurationManager) {
$this->configurationManager = $configurationManager;
$this->cObj = $this->configurationManager->getContentObject();
}
}
?>