[TYPO3] TYPO3: Newbie template question
Søren Vedel
sv at workhouse.com.br
Tue Dec 27 12:04:28 CET 2005
Hi Jasper,
Did you include the css_styled_content extension in your template
(include static)?
Well, do it now and do what you see below!
Try this. There are some small modifications to your setup...
plugin.tx_automaketemplate_pi1 {
# Read the template file:
content = FILE
content.file = fileadmin/template/main/index.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
}
#elements close
# Prefix all relative paths with this value:
relPathPrefix = fileadmin/template/main/
}
#autoparser close
# In the next part the autoparser does the job for you!
# It substitutes the subparts - ###words_between_hashes### (just an
example!)
# 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 ###header### subpart with content:
subparts.header < temp.header
# Substitute the ###menu_1### subpart with content:
subparts.menu_1 < temp.menu_1
# Substitute the ###content### subpart with content:
subparts.content < styles.content.get
# Substitute the ###right_content### subpart with content:
subparts.right_content < styles.content.getRight
}
# Default PAGE object:
page = PAGE
page.typeNum = 0
# Dont disable all headercode - what about your styles?
# page.config.disableAllHeaderCode=1
page.10 < plugin.tx_automaketemplate_pi1
# End of template
In your html-template -
http://localhost/fileadmin/template/main/index.html - you have to insert
the subpartmarkers where you want the content to show up.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<style>
td{font-family:Arial;font-size:10px;color:#747474}
.cap{font-weight:bold;font-size:11px;padding-left:30px;padding-right:30px;padding-top:7px;}
.left{font-weight:bold;font-size:10px;padding-left:30px;padding-right:30px;padding-top:5px;}
.footer{font-weight:bold;color:#FF2A00;text-decoration:none;}
</style>
</head>
<body>
<table cellpadding="0" cellspacing="0" border="0" height="100%">
<tr>
<td rowspan="10" width="50%" height="100%"
background="images/bg1222.jpg" style="background-position:right top;
background-repeat:repeat-y">
</td>
<td rowspan="10" width="1" bgcolor="#000000">
</td>
<td colspan="4">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td rowspan="3"><img src="images/lefttop.jpg">
</td>
<td width="686" height="32"
background="images/top.jpg">
</td>
<td rowspan="3"><img src="images/righttop.jpg">
<!-- here it comes -->
<tr>
<td>###menu_1###</td>
<td width="686" height="32">###content###</td>
<td>###right_content###</td>
</tr>
I hope you get the point now.
Good luck
/Søren
More information about the TYPO3-english
mailing list