Hallo,
ich habe das Tutorial der Modernen Templateerstellung, Teil 1, durchgearbeitet und habe das Problem, dass ich keinen Verweis auf meine CSS Datei erhalte.
Ich habe Typo 3 4.0, automaketemplate und css_styled_content installiert.
Hier mein etwas abgewandelter Code:
# Autoparser konfigurieren
plugin.tx_automaketemplate_pi1{
# Lese das Template
content = FILE
content.file = fileadmin/v5/index.htm
# Definition der Elemente
elements{
BODY.all = 1
BODY.all.subpartMarker = DOCUMENT_BODY
HEAD.all = 1
HEAD.all.subpartMarker = DOCUMENT_HEADER
HEAD.rmTagSections = title
TD.all = 1
DIV.all = 1
UL.all = 1
}
# Präfix für relative Pfade
relPathPrefix = fileadmin/v5/
}
# Menue Links erstellen
temp.submenu_1 = HMENU
# 1. Ebene
temp.submenu_1.1 = TMENU
temp.submenu_1.1 {
NO.allWrap = <li> | </li>
ACT = 1
ACT.allWrap = <li> | </li>
}
# Main Template cObject für den BODY
temp.mainTemplate = TEMPLATE
temp.mainTemplate {
template =< plugin.tx_automaketemplate_pi1
# Auswahl des content innerhalb BODY
workOnSubpart = DOCUMENT_BODY
# Menue 1
subparts.submenu<temp.submenu_1
#subparts.submenu= TEXT
#subparts.submenu.value = HELLO WORLD - submenu
# Content Substituieren
subparts.content < styles.content.get
#subparts.content = TEXT
#subparts.content.value = HELLO WORLD - CONTENT
}
# Main Template cObject für den HEAD
temp.headTemplate = Template
temp.headTemplate {
template =< plugin.tx_automaketemplate_pi1
workOnSubpart = DOCUMENT_HEADER
}
# Default Seite
page = PAGE
page.typeNum = 0
page.10 < temp.mainTemplate
page.headerData.10 < temp.headTemplate
Die CSS-Datei, welche ich im gleichen Verzeichnis wie das Template liegen habe, wird nicht mit eingebunden, sondern irgendeine andere css-Datei. Meine Datei heisst main.css und liegt in filedmin\v5\.
Hier ist das Resultat:
<!DOCTYPE html
PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!--
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-2006 of Kasper Skaarhoj. Extensions are copyright of their respective owners.
Information and contribution at http://typo3.com/ and http://typo3.org/
-->
<link rel="stylesheet" type="text/css" href="typo3temp/stylesheet_e99aac0be0.css" />
<title>oeko</title>
<meta name="generator" content="TYPO3 4.0 CMS" />
<script type="text/javascript" src="typo3temp/javascript_757c080409.js"></script>
</head>
<body>
<div id="container"><!--###container### begin -->
<div id="head"><!--###head### begin --><!--###head### end --></div>
<div id="menu"><!--###menu### begin -->
<ul>
<li><a href="fileadmin/v5/#">Irgendwas</a></li>
<li><a href="fileadmin/v5/#">Irgendwas</a></li>
<li><a href="fileadmin/v5/#">Irgendwas</a></li>
<li><a href="fileadmin/v5/#">Irgendwas</a></li>
<li><a href="fileadmin/v5/#">Irgendwas</a></li>
</ul>
<!--###menu### end --></div>
<div id="menu1"><!--###menu1### begin -->
<p>Submenu:</p>
<ul id="submenu"><li><a href="index.php?id=8" onfocus="blurLink(this);">oeko system</a></li><li><a href="index.php?id=7" onfocus="blurLink(this);">Outsourcing</a></li><li><a href="index.php?id=6" onfocus="blurLink(this);">Personaldienstleistungen</a></li><li><a href="index.php?id=5" onfocus="blurLink(this);">Gebäudeserice</a></li><li><a href="index.php?id=4" onfocus="blurLink(this);">Kunden</a></li><li><a href="index.php?id=3" onfocus="blurLink(this);">Imageumkehrfalle</a></li><li><a href="index.php?id=2" onfocus="blurLink(this);">Angebote</a></li></ul>
<!--###menu1### end --></div>
<div id="content"></div>
<div id="foot"><!--###foot### begin -->
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit</p>
<!--###foot### end --></div>
<!--###container### end --></div>
</body>
</html>
Was habe ich hier falsch gemacht bzw. was muss ich noch machen, damit der Code vernünftig aussieht und meine CSS hier Anwendung findet.
mfg