Also, hier nochmal ALLES was ich an source habe:
Root-Template
seite = PAGE
seite {
typeNum = 0
bodyTag = <body>
10 = TEMPLATE
10.template = FILE
10.template.file = fileadmin/template/main/template_1.html
10.workOnSubpart = DOCUMENT_BODY
10.marks {
RECHTS < temp.rechts
#LINKS < temp.links
}
}
ext: Main TEMPLATE cObject:
# Main TEMPLATE cObject for the BODY
temp.mainTemplate = TEMPLATE
temp.mainTemplate {
# Feeding the content from the Auto-parser to the TEMPLATE cObject:
template =< plugin.tx_automaketemplate_pi1
# Select only the content between the <body>-tags
workOnSubpart = DOCUMENT_BODY
# Substitute the ###menu_1### subpart with dynamic menu:
subparts.menu_1 < temp.menu_1
# Substitute the ###content### subpart with some example content:
subparts.content < styles.content.get
}
# Main TEMPLATE cObject for the HEAD
temp.headTemplate = TEMPLATE
temp.headTemplate {
# Feeding the content from the Auto-parser to the TEMPLATE cObject:
template =< plugin.tx_automaketemplate_pi1
# Select only the content between the <head>-tags
workOnSubpart = DOCUMENT_HEADER
}
# Default PAGE object:
page = PAGE
page.typeNum = 0
# Copying the content from TEMPLATE for <body>-section:
page.10 < temp.mainTemplate
# Copying the content from TEMPLATE for <head>-section:
page.headerData.10 < temp.headTemplate
ext: Menu 1
# Menu 1 cObject
temp.menu_1 = HMENU
# First level menu-object, textual
temp.menu_1.1 = TMENU
temp.menu_1.1 {
# Normal state properties
NO.allWrap = <div class="menu1-level1-no"> | </div>
NO.stdWrap.htmlSpecialChars = 1
# Enable active state and set properties:
ACT = 1
ACT.stdWrap.htmlSpecialChars = 1
ACT.allWrap = <div class="menu1-level1-act"> | </div>
}
# Second level menu-object, textual
temp.menu_1.2 = TMENU
temp.menu_1.2 {
# Normal state properties
NO.allWrap = <div class="menu1-level2-no"> | </div>
NO.stdWrap.htmlSpecialChars = 1
# Enable active state and set properties:
ACT = 1
ACT.stdWrap.htmlSpecialChars = 1
ACT.allWrap = <div class="menu1-level2-act"> | </div>
}
# Third level menu-object, textual
temp.menu_1.3 = TMENU
temp.menu_1.3 {
# Normal state properties
NO.allWrap = <div class="menu1-level3-no"> | </div>
NO.stdWrap.htmlSpecialChars = 1
# Enable active state and set properties:
ACT = 1
ACT.stdWrap.htmlSpecialChars = 1
ACT.allWrap = <div class="menu1-level3-act"> | </div>
}
# Third level menu-object, textual
temp.menu_1.4 = TMENU
temp.menu_1.4 {
# Normal state properties
NO.allWrap = <div class="menu1-level4-no"> | </div>
NO.stdWrap.htmlSpecialChars = 1
# Enable active state and set properties:
ACT = 1
ACT.stdWrap.htmlSpecialChars = 1
ACT.allWrap = <div class="menu1-level4-act"> | </div>
}
ext: Auto-parser plugin
# Configuring the Auto-Parser for main template:
plugin.tx_automaketemplate_pi1 {
# Read the template file:
content = FILE
content.file = fileadmin/template/main/template_1.html
# Here we define which elements in the HTML that
# should be wrapped in subpart-comments:
elements {
BODY.all = 1
BODY.all.subpartMarker = DOCUMENT_BODY
HEAD.all = 1
HEAD.all.subpartMarker = DOCUMENT_HEADER
HEAD.rmTagSections = title
TD.all = 1
}
# Prefix all relative paths with this value:
relPathPrefix = fileadmin/template/main/
}
temp.rechts
temp.rechts = CONTENT
temp.rechts {
table = tt_content
select.orderBy = sorting
select.where = colPos = 2
}
So, das waren jetz die Template-Datein.
Alle Templates sind in das erste Template (Root-Template) verlinkt.
Reihenfolge:
ext: Auto-parser plugin
ext: Menu 1
ext: Main TEMPLATE cObject
temp.rechts
Hier jetzt meine HTML-Template-Source:
<?xml version="1.0" excoding="iso.8859-1"?>
<?xml-stylesheet href="#internalStyle" type="text/css"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EM"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transidional.dtd">
<html>
<head>
<title>Base template, header, menu, content and footer.</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<style type="text/css" id="internalStyle">
/*<![CDATA[*/
BODY { margin: 0 0 0 0; background-color: white; }
/*]]>*/
</style>
<link href="res/stylesheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0">
<!-- Header image row: -->
<tr>
<td colspan="3" id="header_1"><img src="images/headerimage.jpg" width="600" height="100" alt="" border="0" /></td>
</tr>
<tr>
<!-- Menu table cell: -->
<td width="200" id="menu_1">
<div class="menu1-level1-no"><a href="#">Menu item 1</a></div>
<div class="menu1-level1-no"><a href="#">Menu item 2</a></div>
<div class="menu1-level1-act"><a href="#">Menu item 3 (act)</a></div>
<div class="menu1-level2-no"><a href="#">Level 2 item</a></div>
<div class="menu1-level2-no"><a href="#">Level 2 item</a></div>
<div class="menu1-level2-act"><a href="#">Level 2 item (act)</a></div>
<div class="menu1-level1-no"><a href="#">Menu item 2</a></div>
</td>
<!-- Page Content Area table cell: -->
<td width="460" id="content">
<h1>Buy PaperShredder(tm) Gizmo with 30-days money-back guarantee!</h1>
<img src="images/paperwork.jpg" width="192" height="156" border="0" alt="" align="right"/>
<p class="bodytext">jhsdfghjfsdgsdjfghdhfjghdfgdfgkdfhkgdfvbk</p>
<p class="bodytext">jhsdfghjfsdgsdjfghdhfjghdfgdfgkdfhkgdfvbk</p>
<br />
</td>
<td width="160">###RECHTS###</td>
</tr>
<!-- Footer row: -->
<tr>
<td colspan="3" id="footer">
<p>Main Dish & Son inc. * 12345 MuhKuh City, suite 1337 * Hannover</p>
</td>
</tr>
</table>
</body>
</html>
Ich hoffe da findet jemand was.
Sonst bin ich ehrlich gesagt voll am Arsch!