0

也许我只是错过了一些东西......显然,到目前为止,我没有找到任何帮助。

这个问题,看起来很简单,我只是想为我的根树中的一个页面加载一个“稍微”不同的页面。所有其他页面共享 Root 模板,但我需要这个页面具有完全不同类型的内容和稍微不同的标题,因此需要辅助模板。

我为此做了以下事情:

# Default PAGE object:
page = PAGE

# Define the template
page.10 = TEMPLATE

# Our template is a file
page.10.template = FILE

# Our template file is fileadmin/template/media/media.html
page.10.template.file = fileadmin/template/media/media.html

但所有这些也导致页面加载时完全空白的 HTML。没有错误,什么都没有!页面源刚刚出现:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <!-- 
        This website is powered by TYPO3 - inspiring people to share!
        TYPO3 is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.
        TYPO3 is copyright 1998-2013 of Kasper Skaarhoj. Extensions are copyright of their respective owners.
        Information and contribution at http://typo3.org/
    -->
    <link rel="shortcut icon" href="http://192.168.206.11/introductionpackage-6.1.0/fileadmin/template/media/favicon.ico" type="image/x-ico; charset=binary">
    <link rel="icon" href="http://192.168.206.11/introductionpackage-6.1.0/fileadmin/template/media/favicon.ico" type="image/x-ico; charset=binary">
    <title>Media</title>
    <meta name="generator" content="TYPO3 6.1 CMS">

    <link rel="stylesheet" type="text/css" href="typo3temp/stylesheet_15a396fd13.css?1369410324" media="all">
    <link rel="stylesheet" type="text/css" href="fileadmin/template/style.css?1369398600" media="all">
</head>
    <body>
    </body>
</html>

所以,我想问题是,我怎样才能让一个页面有一个单独的模板?

4

2 回答 2

0

一个典型的错误可能是您忘记包含默认页面打字稿模板,因为代码中的打字稿对象页面需要它来显示内容或从数据库中提取内容。在模板的模板配置中查看包含静态排版模板并包含 css.styled.content。

于 2013-06-05T22:13:14.747 回答
0

不知道这是否正确,但这是我发现要做的。

我制作了模板并将其放在特定文件夹中。然后我做了以下,它的工作原理!

# Default PAGE object:
# page = PAGE
page.10 = NULL

page.includeJSlibs.jwplayer = 1
page.includeJSlibs.jwplayer = fileadmin/template/js/jwplayer/jwplayer.js

# Define the template
page.20 = TEMPLATE

# Our template is a file
page.20.template = FILE

# Our template file is fileadmin/template/media/media.html
page.20.template.file = fileadmin/template/media/media.html

# Insert shortcut icon in the head of the website
page.shortcutIcon = fileadmin/template/media/favicon.ico

# Insert stylesheet in the head of the website
# page.stylesheet = fileadmin/template/style.css

# Work with the subpart "DOCUMENT"
# page.20.workOnSubpart = DOCUMENT

######################################################
#
# Configuration of SUBPARTS
#
######################################################

# Define the subparts, which are inside the subpart DOCUMENT
page.20.subparts {

}

######################################################
#
# Configuration of MARKERS
#
######################################################

# Define the markers inside the subpart DOCUMENT
page.20.marks {
  # Load the logo
  LOGO = IMAGE
  LOGO.file = fileadmin/templates/images/logo.png
  LOGO.altText = Mountain Top

  # Menu 1 cObject
  menu_1 = HMENU
}

# First level menu-object, textual
page.20.marks.menu_1.1 = TMENU
page.20.marks.marks.menu_1.1 {
  # Normal state properties
  NO.allWrap = <li> | </li>
  # Enable active state and set properties:
  ACT = 1
  ACT.allWrap = <li class="active"> | </li>
}

# Second level menu-object, textual
page.20.marks.menu_1.2 = TMENU
page.20.marks.menu_1.2 {
  # Normal state properties
  NO.allWrap = <div class="menu1-level2-no"> | </div>
  # Enable active state and set properties:
  ACT = 1
  ACT.allWrap = <div class="menu1-level2-act"> | </div>
}
于 2013-06-06T20:31:56.643 回答