Zum Inhalt springen

Anfängertemplate mit Menü

Erstellt am 8. Juni 2005 · 3 Antworten · letzte Antwort am 13. Juni 2005

Tags: Frage

Rebecca ·

Hallo liebes Forum,

ich habe wahrscheinlich nur ein Verständnisproblem. Also:

Ich habe mich an einem Template probiert, nur leider funktioniert es nicht richtig. Kann mir vielleicht jmd helfen?

Hier der HTML-Quelltext:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<!-- ###DOCUMENT_HEADER### -->
<title>Reuter - Die Werkstatt</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" media="screen" href="stylesheet.css" type="text/css" />
<!-- ###DOCUMENT_HEADER### -->
</head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr bgcolor="#CCCCCC">
    <td width="45%" bgcolor="cccccc"></td>
    <td width="55%" bgcolor="cccccc">
      <div align="right">
	<img src="images/logo_klein.gif" width="211" height="64" alt="" /><br />
	<a href="http://www.assistance-partner.de" target="_blank">
          <img src="images/assistance.gif" width="212" height="47" border="0" alt="" />
        </a>
      </div>
    </td>
  </tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td colspan="2" bgcolor="#000066" class="menue">
		<!--###menu_1###-->
		<div class="menu1-level1-no"><a href="fileadmin/template/#">
                <font color="#FFFFFF">Home</font></a></div>
		<div class="menu1-level1-no"><a href="fileadmin/template/#">
                <font color="#FFFFFF">Über uns</font></a></div>
		<div class="menu1-level1-act"><a href="fileadmin/template/#">
                <font color="#FFFFFF">Service</font></a></div>
		<div class="menu1-level2-no"><a href="fileadmin/template/#">
                <font color="#FFFFFF">Abschleppbereich</font></a></div>
		<div class="menu1-level2-no"><a href="fileadmin/template/#">
                <font color="#FFFFFF">Abgasuntersuchung</font></a></div>
		<div class="menu1-level2-no">
                <a href="http://www.westfalen-ag.de/produktinfos/standorte.php">
                <font color="#FFFFFF">Kraftstoffpreise</font></a></div>
		<div class="menu1-level2-no"><a href="fileadmin/template/#">
                <font color="#FFFFFF">Mietwagen</font></a></div>
		<div class="menu1-level2-no"><a href="fileadmin/template/#">
                <font color="#FFFFFF">Partner</font></a></div>
		<div class="menu1-level2-act"><a href="fileadmin/template/#">
                <font color="#FFFFFF">Prüforganisation</font></a></div>
		<div class="menu1-level1-no"><a href="fileadmin/template/#">
                <font color="#FFFFFF">Kontakt</font></a></div>
 		<div class="menu1-level1-no"><a href="fileadmin/template/#">
                <font color="#FFFFFF">Impressum</font></a></div>
		<div class="menu1-level1-no"><a href="fileadmin/template/#">
                <font color="#FFFFFF">Sitemap</font></a></div>
		<!--###menu_1###-->
	</td>
  </tr>
</table>
<!-- ###DOCUMENT_BODY### -->
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <!--Page Content Area Table cell:-->		
  <tr>
    <td colspan="2" bgcolor="#FFFFFF">
		<!-- ###content### -->
		<!-- ###content### -->
	</td>
  </tr>
</table>
 <!-- ###DOCUMENT_BODY### -->
</body>
</html>

und hier das Typo3 Script:

# Configuring the Auto-Parser for main template:
plugin.tx_automaketemplate_pi1 {
    # Read the template file:
  content = FILE
  content.file = fileadmin/template.htm
 
    # 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/
}
 
 
# 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.menu_1 = TEXT
  subparts.menu_1.value = Home
 
    # Substitute the ###content### subpart with some example content:
  subparts.content = TEXT
  subparts.content.value = Home
 }
 
 
# 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

#tt_content.menu.20.2 < styles.sitemap.gs
#page.stylesheet = stylesheet*.css

Hier noch die derzeitige Ansicht:
http://www.reuter-kfz.de/angebot/

_________________________________________________________________________________

Das zu dem Template.
Jetzt habe ich noch ein kleines Menüproblem. Ich würde gerne ein horizontales Klappmenü erstellen. Das was ich jetzt habe ist leider vertikal. Wo kann ich mir das anlesen, oder weis jmd vielleicht die Syntax?

Hier noch mal das Menü:

<!--###menu_1###-->
<div class="menu1-level1-no"><a href="fileadmin/template/#"><font color="#FFFFFF">Home</font></a></div>
<div class="menu1-level1-no"><a href="fileadmin/template/#"><font color="#FFFFFF">Über uns</font></a></div>
<div class="menu1-level1-act"><a href="fileadmin/template/#"><font color="#FFFFFF">Service</font></a></div>
<div class="menu1-level2-no"><a href="fileadmin/template/#"><font color="#FFFFFF">Abschleppbereich</font></a></div>
<div class="menu1-level2-no"><a href="fileadmin/template/#"><font color="#FFFFFF">Abgasuntersuchung</font></a></div>
<div class="menu1-level2-no"><a href="http://www.westfalen-ag.de/produktinfos/standorte.php"><font color="#FFFFFF">Kraftstoffpreise</font></a></div>
<div class="menu1-level2-no"><a href="fileadmin/template/#"><font color="#FFFFFF">Mietwagen</font></a></div>
<div class="menu1-level2-no"><a href="fileadmin/template/#"><font color="#FFFFFF">Partner</font></a></div>
<div class="menu1-level2-act"><a href="fileadmin/template/#"><font color="#FFFFFF">Prüforganisation</font></a></div>
<div class="menu1-level1-no"><a href="fileadmin/template/#"><font color="#FFFFFF">Kontakt</font></a></div>
<div class="menu1-level1-no"><a href="fileadmin/template/#"><font color="#FFFFFF">Impressum</font></a></div>
<div class="menu1-level1-no"><a href="fileadmin/template/#"><font color="#FFFFFF">Sitemap</font></a></div>
<!--###menu_1###-->

Ich bin für jede Hilfe dankbar.

MfG Rebecca [/url]

cyberDoc ·

Hallo Rebecca!

Bin mir nicht ganz sicher, aber verschiebe doch mal die Zeile 59 (<!-- ###DOCUMENT_BODY### -->) nach oben in Zeile 13 unterhalb von <body>.

ciao,
Flo

Rebecca ·

Hi, danke für die Antwort.
Leider hat es nicht geklappt. Hast du vielleicht noch eine Idee?
Vielen lieben Dank im Voraus.

MfG Rebecca

Amelia ·

Wieso kommentierst Du die Marker aus ???
Die willst Du doch sicher im Menü generiert haben, oder!?

aus:

<!--###menu_1###-->

mach:

###menu_1###