Hallo Leute!
Ich bin seit knapp ner Woche dabei mich mit Typo 3 zu beschäftigen, hab erstmal die Tuts durchgelesen und die refs auch mal überflogen..
Schon schön zu sehen das OpenSource sowas tiefdurchdachtes wie Typo3 herausbringen kann..
Ich hab jetzt angefangen ein Homepageprojekt auf Typo3 umzubauen, scheitere aber schon an der Erstellung des dynamischen Menus (der Rest hat auch so noch recht gut geklappt). Das alles hab ich nach dem MTB/1 versucht umzusetzen..
Mein Ziel ist es ein MainMenu und ein SubMenu zu realisieren, wobei die Menus jeweils einzeilig sind und untereinander stehen. Das Template passt, die Tags werden vom autoparser erstellt und von den Subparts erkannt, aber leider nur gelöscht..
hier das Template:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link href="gcu_class.css" rel="stylesheet" type="text/css" media="all">
</head>
<body background="fond.jpg" bgcolor="#ffffff" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0">
<table width="643" border="0" cellspacing="2" cellpadding="0" height="580">
<tr height="515">
<td align="center" valign="bottom" width="80" height="515" id="mlocation"><img src="mlocations/mlocation-willkommen.jpg" alt="" height="360" width="80" border="0"></td>
<td id="content" colspan="2" valign="top" align="center" width="557" height="515">
<div class="Headline" class="Headline" align="center">
Hier steht eine Headline</div>
<div class="copy">
<p>Hier steht etwas Copytext..</p>
</div>
</td>
</tr>
<tr height="34">
<td width="80" height="34"></td>
<td width="40" height="34"></td>
<td valign="bottom" width="515" height="34">
<table width="490" border="0" cellspacing="2" cellpadding="0" height="25" id="Main_Menu">
<tr>
<td class="Main_Menu_act">Der Club</td>
<td class="Main_Menu_no" align="center">Der Platz</td>
<td class="Main_Menu_no" align="center">Der Pro</td>
<td class="Main_Menu_no" align="center">Die Turniere</td>
<td class="Main_Menu_no" align="right">Der Service</td>
</tr>
</table>
</td>
</tr>
<tr valign="top" height="23">
<td width="80" height="23"></td>
<td width="40" height="23"></td>
<td width="515" height="23">
<table width="490" border="0" cellspacing="2" cellpadding="0" height="20" id="Sub_Menu">
<tr>
<td class="Sub_Menu_act">Jugend</td>
<td class="Sub_Menu_no" align="center">Ladies</td>
<td class="Sub_Menu_no" align="center">Senioren</td>
<td class="Sub_Menu_no" align="center">Senioren-Liga</td>
<td class="Sub_Menu_no" align="center">Jungsenioren-Liga</td>
<td class="Sub_Menu_no" align="right">Internes</td>
</tr>
</table>
</td>
</tr>
</table>
<p></p>
</body>
</html>
Hier das Template Setup:
# Configuring the Auto-Parser:
plugin.tx_automaketemplate_pi1 {
# Read the template file:
content = FILE
content.file = fileadmin/templates/main_tpl/template_std.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
TABLE.all = 1
}
# Prefix all relative paths with this value:
relPathPrefix = fileadmin/templates/main_tpl/
}
temp.m_menu = HMENU
temp.m_menu.1 = TMENU
temp.m_menu.1 {
NO.allWrap = <td class="Main_Menu_no" align="center"> | </td>
ACT = 1
ACT.allWrap = <td class="Main_Menu_act" align="center"> | </td>
}
temp.s_menu = HMENU
temp.s_menu.2 = TMENU
temp.s_menu.2 {
NO.allWrap = <td class="Sub_Menu_no" align="center"> | </td>
ACT = 1
ACT.allWrap = <td class="Sub_Menu_act" align="center"> | </td>
}
# 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 some example content:
subparts.Main_Menu = temp.m_menu
# Substitute the ###menu_1### subpart with some example content:
subparts.Sub_Menu < temp.s_menu
# Substitute the ###content### subpart with some example content:
subparts.content < styles.content.get
# Substitute the ###mlocation## subpart with an example image:
subparts.mlocation = IMAGE
subparts.mlocation {
file = fileadmin/bilder/mlocation/mlocation-willkommen.jpg
file.width = 80
}
}
# 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
page.bodyTag = <body background="fileadmin/templates/main_tpl/fond.jpg" bgcolor="#ffffff" leftmargin="0" marginheight="0" marginwidth="0" topmargin="10">
Mag alles ein wenig unübersichtlich sein, tut mir leid, ich mach noch meine ersten Schritte und die recht wackelig..
Die passenden Stellen sind an sich analog dem MTB, funktioniert aber trotzdem nicht: Es kommt diese Homepage dabei raus:
<!DOCTYPE html
PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<!--
This website is brought to you by TYPO3 - get.content.right
TYPO3 is a free open source Content Management Framework created by Kasper Skaarhoj and licensed under GNU/GPL.
TYPO3 is copyright 1998-2004 of Kasper Skaarhoj. Extensions are copyright of their respective owners.
Information and contribution at http://www.typo3.com
-->
<style type="text/css">
/*<![CDATA[*/
<!--
/* default styles for extension "tx_mininews_pi1" */
.tx-mininews-pi1 .tx-mininews-pi1-listrow P.tx-mininews-pi1-listrowField-title { font-weight:bold; }
.tx-mininews-pi1 .tx-mininews-pi1-listrow P.tx-mininews-pi1-listrowField-teaser { margin-bottom:15px; }
.tx-mininews-pi1 .tx-mininews-pi1-fp_listrow P.tx-mininews-pi1-fp_listrowField-title { font-weight:bold; }
.tx-mininews-pi1 .tx-mininews-pi1-fp_listrow P.tx-mininews-pi1-fp_listrowField-teaser { margin-top:0px; margin-bottom:10px; }
.tx-mininews-pi1 .tx-mininews-pi1-singleView P.tx-mininews-pi1-singleViewField-teaser { font-style:italic; margin-top:5px; margin-bottom:10px; }
.tx-mininews-pi1 .tx-mininews-pi1-browsebox P SPAN.tx-mininews-pi1-browsebox-strong { font-weight:bold; }
.tx-mininews-pi1 .tx-mininews-pi1-listrow P.tx-mininews-pi1-listrowField-teaser A { color:black; text-decoration:none; }
.tx-mininews-pi1 .tx-mininews-pi1-listrow P.tx-mininews-pi1-listrowField-teaser A:hover { color:black; text-decoration:none; }
-->
/*]]>*/
</style>
<link href="fileadmin/templates/main_tpl/gcu_class.css" rel="stylesheet" type="text/css" media="all">
<title>Willkommen</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="generator" content="TYPO3 3.6 CMS" />
<script type="text/javascript">
/*<![CDATA[*/
<!--
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
var msie4 = (browserName == "Microsoft Internet Explorer" && browserVer >= 4);
if ((browserName == "Netscape" && browserVer >= 3) || msie4 || browserName=="Konqueror") {version = "n3";} else {version = "n2";}
// Blurring links:
function blurLink(theObject) { //
if (msie4) {theObject.blur();}
}
// -->
/*]]>*/
</script>
</head>
<body background="fileadmin/templates/main_tpl/fond.jpg" bgcolor="#ffffff" leftmargin="0" marginheight="0" marginwidth="0" topmargin="10">
<table width="643" border="0" cellspacing="2" cellpadding="0" height="580">
<tr height="515">
<td align="center" valign="bottom" width="80" height="515" id="mlocation"><img src="fileadmin/bilder/mlocation/mlocation-willkommen.jpg" width="80" height="360" border="0" alt="" title="" /></td>
<td id="content" colspan="2" valign="top" align="center" width="557" height="515">
<!-- CONTENT ELEMENT, uid:3/image [begin] -->
<a name="3"></a>
<!-- Image block: [begin] -->
<div align="center"><table width="470" border="0" cellspacing="0" cellpadding="0" class="imgtext-table"><tr><td colspan="1"><img src="clear.gif" width="470" height="1" alt="" /></td></tr><tr><td valign="top"><img src="uploads/pics/clubhaus.jpg" width="470" height="369" border="0" align="top" alt="" title="" /><br /></td></tr></table></div><img src="clear.gif" width="1" height="6" border="0" class="spacer-gif" alt="" title="" /><br />
<!-- Image block: [end] -->
<!-- CONTENT ELEMENT, uid:3/image [end] -->
<!-- CONTENT ELEMENT, uid:2/text [begin] -->
<a name="2"></a>
<!-- Header: [begin] -->
<div class="csc-header csc-header-n2"><h1>Willkommen auf der Site</h1></div>
<!-- Header: [end] -->
<!-- Text: [begin] -->
<p class="bodytext">Schön das sie reinschauen!</p>
<!-- Text: [end] -->
<!-- CONTENT ELEMENT, uid:2/text [end] -->
</td>
</tr>
<tr height="34">
<td width="80" height="34"></td>
<td width="40" height="34"></td>
<td valign="bottom" width="515" height="34">
<table width="490" border="0" cellspacing="2" cellpadding="0" height="25" id="Main_Menu"></table>
</td>
</tr>
<tr valign="top" height="23">
<td width="80" height="23"></td>
<td width="40" height="23"></td>
<td width="515" height="23">
<table width="490" border="0" cellspacing="2" cellpadding="0" height="20" id="Sub_Menu"></table>
</td>
</tr>
</table>
<p></p>
</body>
</html>
Ich hoffe Ihr könnt mir helfen.. wird so wie ich mich kenne irgendwas kleines sein..
Danke schonmal im vorraus!