我正试图开始使用Typo3流体模板引擎,我设法让它以一种肮脏的方式运行。但后来我找到了fedext.net项目和这个演示。并试图跟踪本教程。我以以下目录结构结束:
typo3conf/
ext/
my_extension/
Classes/
Controller/
PageController.php
Configuration/
constants.txt <empty for now>
setup.txt
Resources/
Private/
Layouts/
Partials/
Templates/
Page/
FrontPage.html
Public/
ext_autoload.php <empty>
ext_emload.php
ext_localconf.php <empty>
ext_tables.phpPageController.php:
<?php
class Tx_MyExtension_Controller_PageController extends Tx_Fluidpages_Controller_AbstractPageController {
public function frontPageAction() {
}
}setup.txt:
plugin.tx_myextension.view {
templateRootPath = EXT:my_extension/Resources/Private/Templates/
partialRootPath = EXT:my_extension/Resources/Private/Partials/
layoutRootPath = EXT:my_extension/Resources/Private/Layouts/
}FrontPage.html:
{namespace v=Tx_Vhs_ViewHelpers}
{namespace flux=Tx_Flux_ViewHelpers}
<f:layout name="Page" />
<div xmlns="http://www.w3.org/1999/xhtml" lang="en"
xmlns:v="http://fedext.net/ns/vhs/ViewHelpers"
xmlns:flux="http://fedext.net/ns/flux/ViewHelpers"
xmlns:f="http://fedext.net/ns/fluid/ViewHelpers">
<f:section name="Configuration">
<flux:flexform id="default-page" label="Default page template">
<flux:flexform.field.input name="settings.entryLevel"
label="Main menu entry level override for this page only"
eval="int,trim" minimum="0" maximum="6"
default="{v:var.typoscript(path: 'lib.menu.main.entryLevel')}">
<flux:flexform.field.wizard.slider hideParent="TRUE" step="1" width="100" />
</flux:flexform.field.input>
</flux:flexform>
<flux:flexform.grid>
<flux:flexform.grid.row>
<flux:flexform.grid.column colPos="1" name="Hero Unit" />
</flux:flexform.grid.row>
<flux:flexform.grid.row>
<flux:flexform.grid.column colPos="0" name="Main Content" />
</flux:flexform.grid.row>
<flux:flexform.grid.row>
<flux:flexform.grid.column colPos="2" name="Footer Content" />
</flux:flexform.grid.row>
</flux:flexform.grid>
</f:section>
<f:section name="Content">
<v:page.content.render column="0" />
</f:section>
<f:section name="AnotherSection">
<!-- more sections as desired, rendering triggered from the "Page.html" Layout file -->
</f:section>
</div>ext_emconf.php
<?php
$EM_CONF[$_EXTKEY] = array (
'title' => 'Homepage',
'description' => 'Homepage',
'category' => 'misc',
'shy' => 0,
'version' => '1.0.0',
'dependencies' => '',
'conflicts' => '',
'priority' => '',
'loadOrder' => '',
'module' => '',
'state' => 'stable',
'uploadfolder' => 0,
'createDirs' => '',
'modify_tables' => '',
'clearcacheonload' => 0,
'lockType' => '',
'author' => 'me',
'author_email' => 'mail@me.com',
'author_company' => 'me',
'CGLcompliance' => NULL,
'CGLcompliance_note' => NULL,
'constraints' =>
array (
'depends' =>
array (
'typo3' => '6.1.0',
'cms' => '',
'flux' => '5.0.0',
),
'conflicts' =>
array (
'templavoila' => '',
),
'suggests' =>
array (
),
),
);
?>ext_tables.php
<?php
if (!defined ('TYPO3_MODE')) {
die ('Access denied.');
}
t3lib_extMgm::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'My Extension Homepage');
Tx_Flux_Core::registerProviderExtensionKey('my_extension', 'Page');因此,问题是:尽管后端似乎可以工作,但我经常在前端得到致命错误:
核心:错误处理程序(FE):PHP警告:为C:\xampp\apache\htdocs\typo-fluid\typo3temp\Cache\Code\cache_core\ClassLoader_AbstractConfigurationProvider_bc71b4377996b2e6d72f.php第481行的foreach()提供的无效参数
在调试时,我发现所提供的值为空。看来我错过了一些简单的东西。但是上面的文件结构只是稍微修改了一下这玩意儿版本。
有什么好的一步一步的教程如何用fedext工具创建几个模板和内容元素?因为我安装了介绍包,并且尝试在后端和文件结构中复制设置,但是看起来这还不够,我在这里缺少了一些非常基本的东西。
发布于 2013-09-23 10:13:39
因此,这里的主要问题不是原始问题中提到的警告,而是Apache日志中的错误:
PHP Fatal error: Cannot redeclare class Tx_Vhs_Service_AssetService in...这是由PHP 5.3.3不兼容和vhs扩展引起的。因此,我已经更新了PHP安装并修复了我的扩展配置中的几个输入错误,之后它就开始按预期工作了。
https://stackoverflow.com/questions/18903082
复制相似问题