0

I am struggling to get a Typo3 website working using Fluid templates instead of TV. I used modernpackage to create an extension for my template. However, when the site is rendered (without changing anything to the template) the css and js are loaded twice but one of them returns a 404.

When I look in the code I see that the head tag is renderend correctly, but the body tag is rendered like this:

<body class="page-1 template-">
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>TYPO3 Sitestarter Start</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<link href="css/mediaqueries.css" rel="stylesheet">
<link href="css/flexslider.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="css/responsiveTable.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="css/yoxview.css" rel="stylesheet">

<link rel="shortcut icon" href="img/favicon.png">

<script src="js/modernizer-2.6.2.min.js"></script>
    <link rel="stylesheet" type="text/css" href="http://sitename/typo3/sysext/t3skin/stylesheets/standalone/admin_panel.css" />    </head>
<body>
...

It looks like the whole template is rendered in the body. Why is this happening and how can I prevent this from happening?

4

2 回答 2

0

当不使用布局和部分时,通常会完全渲染流体模板。在您对modernpackage的改编中,请确保在您的主模板顶部的行

<f:layout name="Default" />

包含它将使用扩展模板文件夹的布局子文件夹中的文件“Default.html”作为布局。该文件将仅包含一行:

<f:render section="body" />

通过这样做,你的主模板中唯一会被渲染的是这些标签之间的任何东西:

<f:section name="body">...</f:section>

现在将忽略之前或之后的任何内容,并且将阻止双重渲染。

于 2013-11-13T19:12:41.807 回答
0

尝试使用 TSOB 和模板分析器来深入了解这一点。通过在 TSOB 中搜索错误链接的文件名之一,您应该找出它的呈现位置并能够将其删除。

于 2013-11-13T06:45:48.250 回答