Typo3 类型3 IRE流体前端
在我的扩展中,我试图做出一个不可撤销的结论。最后,后端工作正常,但前端是我的问题。我想使用普通流体模板,但我尝试的所有名称都是空的 这里是流体:Typo3 类型3 IRE流体前端,typo3,frontend,typoscript,fluid,typo3-7.6.x,Typo3,Frontend,Typoscript,Fluid,Typo3 7.6.x,在我的扩展中,我试图做出一个不可撤销的结论。最后,后端工作正常,但前端是我的问题。我想使用普通流体模板,但我尝试的所有名称都是空的 这里是流体: <h2 class="termin"> {data.header} <f:if condition="{data.tx_examples_noclap} == 1"> <f:then><b class="showFullDrop"></b></f:then
<h2 class="termin">
{data.header}
<f:if condition="{data.tx_examples_noclap} == 1">
<f:then><b class="showFullDrop"></b></f:then>
</f:if>
</h2>
<f:if condition="{data.tx_examples_noclap} == 1">
<f:then><div class="teaser-full"></f:then>
<f:else><div class="teaser-full-show"></f:else>
</f:if>
<div class="text">{data.bodytext}</div>
<div class="table">
<table border="1">
{termine}
<f:for each="{termine}" as="termin">
<tr>
<td>{termin.title}</td>
<td>{termin.termin2}</td>
<td>{termin.termin3}</td>
<td style="background:{termin.farbe}">{termin.platz}</td>
</tr>
</f:for>
</table>
</div>
</div>
{data.header}
{data.bodytext}
{termine}
{终端标题}
{termin.termin2}
{termin.termin3}
{终端平台}
这是打字稿
tt_content.stalla_hp_distribution_termin = COA
tt_content.stalla_hp_distribution_termin {
10 = FLUIDTEMPLATE
10 {
file = EXT:stalla_hp_distribution/Resources/Private/Template/Termin.html
stdWrap.dataWrap = <div id="c{field:uid}" class="termin">|</div>
}
}
tt\u content.stalla\u hp\u distribution\u term=COA
tt_content.stalla_hp_distribution_Term{
10=流体模板
10 {
file=EXT:stalla\u hp\u distribution/Resources/Private/Template/term.html
stdWrap.dataWrap=|
}
}
这里是控制器
1.Classes/Domain/Model/Termin.php
<?php
namespace stalla_hp_distribution\Domain\Model;
/**
*
*
* @package stalla_hp_distribution
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
*
*/
class Termin extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
protected $farbe = NULL;
protected $title = NULL;
protected $termin2 = NULL;
protected $termin3 = NULL;
protected $platz = NULL;
public function getFarbe(){
return $this->farbe;
}
public function getTitle(){
return $this->title;
}
public function getTermin2(){
return $this->termin2;
}
public function getTermin3(){
return $this->termin3;
}
public function getPlatz(){
return $this->platz;
}
public function setFarbe(){
$this->farbe = $farbe;
}
public function setTitle(){
$this->title = $title;
}
public function setTermin2(){
$this->termin2 = $termin2;
}
public function setTermin3(){
$this->termin3 = $termin3;
}
public function setPlatz(){
$this->platz = $platz;
}
}
?>
2. Classes/Domain/Repository/TerminRepository.php
<?php
namespace stalla_hp_distribution\Domain\Repository;
class TerminRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {
}
?>
3. Classes/Controller/TerminController.php
<?php
namespace stalla_hp_distribution\Controller;
/**
* TerminController
*/
class TerminController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController {
/**
* @var stalla_hp_distribution\Domain\Repository\TerminRepository
* @inject
*/
protected $terminRepository;
/**
* action list
*
* @return void
*/
public function listAction() {
$termine = $this->terminRepository->findAll();
$this->view->assign('termine', $termine);
}
}
?>
1.Classes/Domain/Model/term.php
2.类/Domain/Repository/TerminRepository.php
3.类/Controller/TerminController.php
我期待着收到你的来信
问候
Ascawath如果可以将多个标题引用到一个术语,请尝试以下方法
...
<div class="text">{data.bodytext}</div>
<table border="1">
<f:for each="{termine}" as="termin">
<tr>
<f:for each="{termin.title}" as="title" iteration="iterator">
<f:if condition="{iterator.isFirst}">
<td>{title}</td>
</f:if>
</f:for>
...
</tr>
</f:for>
</table>
</div>
。。。
{data.bodytext}
{title}
...
您可以使用数据库查询处理器
访问IRE的数据,并使其在流体模板中可用
下面是一个例子
tt_content.slickcarouselbgimg = FLUIDTEMPLATE
tt_content.slickcarouselbgimg {
templateName = Slickcarouselbgimg
templateRootPaths {
10 = EXT:slickcarousel/Resources/Private/Templates/
}
partialRootPaths {
10 = EXT:slickcarousel/Resources/Private/Partials/
}
layoutRootPaths {
10 = EXT:slickcarousel/Resources/Private/Layouts/
}
dataProcessing {
20 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
20 {
table = tx_slickcarouselbgimg
pidInList.field = pid
where {
data = field:uid
intval = 1
wrap = tt_content=|
}
orderBy = sorting
as = slides
dataProcessing {
10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
10 {
references.fieldName = image
as = images
}
}
}
}
}
在这里,您可以看到整个设置:
我的问题是控制器和流体的通信。我已经试过了。但我仍然看不到这本书的任何内容,从一本免费的Extbase书开始是有意义的。它解释了很多如何正确操作。