如何在 Typo3 6.1.5 中使用 PHP 从我的扩展中的 tt_content 呈现内容对象 [英] How to render a Content Object from tt_content in my extension with PHP in Typo3 6.1.5

查看:12
本文介绍了如何在 Typo3 6.1.5 中使用 PHP 从我的扩展中的 tt_content 呈现内容对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用我的扩展程序呈现来自 tt_content 的特定内容.

I need to render with my extension a specific content from tt_content.

我该怎么做?

TYPO3CMSFrontendContentObjectContentObjectRenderer ?

TYPO3CMSFrontendContentObjectContentObjectRenderer ?

推荐答案

在Extbase扩展中$this->cObj在当前范围内已经没有可用了,所以需要先获取你可以使用:

In Extbase extensions $this->cObj is no more available in the current scope, so you need to get it first before you can use:

$cObj = $this->configurationManager->getContentObject();

$ttContentConfig = array(
    'tables'       => 'tt_content',
    'source'       => 123,
    'dontCheckPid' => 1
);

$content .= $cObj->RECORDS($ttContentConfig);

这篇关于如何在 Typo3 6.1.5 中使用 PHP 从我的扩展中的 tt_content 呈现内容对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆