Zum Inhalt springen

Menü und Content bleibt leer

Erstellt am 28. Januar 2004 · 4 Antworten · letzte Antwort am 28. Januar 2004

Tags: Frage

philipphh ·

Hallo
ich bin gerade dabei das Modern Template Building Skript durchzuarbeiten.
So weit so gut. Bis dahin wo das dynamische Menü eingebaut wurde ging alles.
Folgendes einfache Menü hab ich eingebaut:

# Menu 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>
# Enable active state and set properties:
ACT = 1
ACT.allWrap = <div class="menu1_level1_act"> | </div>
}

Und später das temporäre Menü dem menu zugewiesen:

subparts.menu_1 < temp.menu_1

Hier ein Auszug aus meinem Template

<table class="struktur" border="1" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2">
<div class="blau"></div>
</td>
</tr>
<tr>
<td id="menu_1">SOLLTE HIER NICHT WAS STEHEN</td>
<td id="content">UND HIER AUCH???</td>
</tr>
<tr>
<td colspan="2">

</td>
</tr>
<tr>
</table>

Hab alles aus dem Skript genau abgetippt. Schreibfehler habe ich keine gefunden. Hab ich vergessen was zu aktivieren??

Hoffe Ihr könnte mir helfen

Philipp

[/b]

Unbekannter Benutzer ·

Hallo Philipp

In deinem Template kann ich nirgends eine Marker für
den Subpart sehen.....

<tr>
<td id="menu_1">SOLLTE HIER NICHT WAS STEHEN</td>
<td id="content">UND HIER AUCH???</td>
</tr>

versuch's mal so.....

<tr>
<td id="menu_1">###menu_1###</td>
<td id="content">###content###</td>
</tr>

mit der Zuweisung ID= legst du ja eigentlich "nur" die
eigenschaft des Inhalts mittels CSS fest.

Gruss peay

philipphh ·

Hallo Philipp

In deinem Template kann ich nirgends eine Marker für
den Subpart sehen.....

Das liegt daran, dass ich den Autoparser verwende. Wobei ich mir ernstlich überlege, was er mir bringen soll. Aber davon mal abgesehen.
Das Menü funktioniert übrigens wenn ich mir Seiten der 2. Ebene anschaue. Aber die Rootseite geht nicht, genausowenig wie Seiten der 3. Ebene.

Vielleich hilft das weiter mein Problem zu lösen

Druscha ·

Hallo Philipp,
hab gerade an der gleichen Sache gesessen :-)

1. Für den Inhalt: Hast du im Template bei include static das Objekt content (default) hinzugefügt?

2. Kannst du mal den gesamten Code des TS-Templates posten, bei mir funktionierte es erst nicht wegen der Reihenfolge.

3. Wenn du dir die Site auf der du nichts siehst anzeigen lässt und dann in den Quellcode guckst, was siehst du dann?

Viele Grüße aus Hamburg
Alexandra

philipphh ·

Hallo,
meine Rootpage hat folgendes Setup. Ist noch nicht ganz sauber, weil ich noch rumprobiere
Nochmal schnell das Problem:
Lasse ich mir die Rootpage anzeigen, bleibt das Menü und der Content einfach leer. Es wird überhaupt kein dynamischer Inhalt angezeigt.
Lasse ich mir dagegen eine untergeordnete Seite anzeigen, dann gehts. Aber eine Seite der 3. Ebene geht wieder nicht. GRRRR.

content (default) ist gesetzt.
Clear: constants und Setup ist gesetzt.
Rootlevel ist gesetzt

# Configuring the Auto-Parser for main template:
plugin.tx_automaketemplate_pi1 {
# Read the template file:
content = FILE
content.file = fileadmin/template.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/
}

############################## 
HAUPTEMENU: MENU_MAIN 
############################## 

   # Benoetigte Libaries einfuegen 
   page.includeLibs.tmenu_layers = media/scripts/tmenu_layers.php 

   # Menu erzeugen 
   temp.MENU_MAIN = HMENU 

   ################ 
   # MENU EBENE 1 # 
   ################ 
     # Ebene 1 erzeugen 
     temp.MENU_MAIN.1 = TMENU_LAYERS 
     # Eigenschaften Ebene 1 
     temp.MENU_MAIN.1 { 

                layerStyle = position:absolute;VISIBILITY:hidden; 

                # Menu verankern, damit es nicht der Maus folgt 
                lockPosition = x 

                # Position wo sich die naechste Ebene oeffnen soll (Ebene 2) 
                relativeToParentLayer=1 
                relativeToTriggerItem=1 
                topOffset=16 
                leftOffset=0 
                # Angabe wann sich die naechste Ebene wieder schliessen soll 
                hideMenuWhenNotOver = 50 
                hideMenuTimer = 70 

                # alle Menuepunkte anzeigen 
                expAll=1 

                # Darstellung der aktuellen Ebene 
                wrap = <table border="0" cellspacing="0" cellpadding="0" class="menu1_main"><tr>|</tr></table> 
                # Darstellung im Normalmodus 
                NO { 
                    allWrap = <td class="menu1_main"> | </td> 
                   } 
                # Darstellung wenn Aktiv 
                ACT = 1 
                ACT { 
                     allWrap =  <td class="menu1_main_act"> | </td> 
                     } 

                # Ende Ebene 1 
                } 


   ################ 
   # MENU EBENE 2 # 
   ################ 
     # Ebene 1 erzeugen 
     temp.MENU_MAIN.2 = TMENU_LAYERS 
     # Eigenschaften Ebene 1 
     temp.MENU_MAIN.2 { 

                layerStyle = position:absolute;VISIBILITY:hidden; 

                # Menu verankern, damit es nicht der Maus folgt 
                lockPosition = x 

                # Position wo sich die naechste Ebene oeffnen soll (Ebene 2) 
                relativeToParentLayer=1 
                relativeToTriggerItem=1 
                topOffset=0 
                leftOffset=140 


                # alle Menuepunkte anzeigen 
                expAll=1 

                # Darstellung der aktuellen Ebene 
                wrap = <table border="0" cellspacing="0" cellpadding="0">|</table> 
                # Darstellung im Normalmodus 
                NO { 
                    allWrap = <tr><td class="menu1_main2"> | </td></tr> 
                   } 
                # Darstellung wenn Aktiv 
                ACT = 1 
                ACT { 
                     allWrap =  <tr><td class="menu1_main2_act"> | </td></tr> 
                    } 
                # Darstellung fuer Unterpunkte mit Subpunkten 
                IFSUB = 1 
                IFSUB { 
                     allWrap =  <tr><td class="menu1_main2_sub"> | </td></tr> 
                    } 

                # Ende Ebene 2 
                } 



   ################ 
   # MENU EBENE 3 # 
   ################ 
     # Ebene 1 erzeugen 
     temp.MENU_MAIN.3 = TMENU 
     # Eigenschaften Ebene 1 
     temp.MENU_MAIN.3 { 


                # Darstellung der aktuellen Ebene 
                wrap = <table border="0" cellspacing="0" cellpadding="0">|</table> 
                # Darstellung im Normalmodus 
                NO { 
                    allWrap = <tr><td class="menu1_main2"> | </td></tr> 
                   } 
                # Darstellung wenn Aktiv 
                ACT = 1 
                ACT { 
                     allWrap =  <tr><td class="menu1_main2_act"> | </td></tr> 
                     } 

                # Ende Ebene 3 
                } 

############################## 
HAUPTEMENU: MENU_LEFT 
##############################

temp.MENU_LEFT = HMENU
temp.MENU_LEFT.entryLevel = 1
temp.MENU_LEFT.1 = TMENU
temp.MENU_LEFT.1 {
expAll = 1
NO.allWrap = <font face=Verdana size="1"><b> |</b></font><br>
}
temp.MENU_LEFT.2 = TMENU
temp.MENU_LEFT.2 {
expAll = 1
NO {
allWrap = <font face=Verdana size="1" color=black>| </font><br>
beforeImg = media/bullets/bullet1_n.gif
beforeROImg = media/bullets/bullet1_h.gif
RO = 1
}
}


############################## 
KLICKPFAD
##############################
temp.klickpfad = HMENU
temp.klickpfad {
special = rootline
special.range = 1|-2
1 = TMENU
1.target = _self
1.wrap = <font face="Arial" size="1">|</font>
1.NO.linkWrap = | >
}


# 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_MAIN < temp.MENU_MAIN

# Substitute the ###menu_1### subpart with some example content:

subparts.MENU_LEFT < temp.MENU_LEFT

# Substitute the ###content### subpart with some example content:

subparts.content < styles.content.get

# Substitute the ###klickpfad### subpart with the rootline:

subparts.klickpfad < temp.klickpfad
}
# 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

Und hier mein Template

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

<body>
<table class="struktur" border="1" cellpadding="0" cellspacing="0">
<tr>
	<td height="41" colspan="2">
	<div class="blau"></div>
	</td>
</tr>
<tr>
  <td id="MENU_MAIN" colspan="2">jkljlk
  </td>
</tr>
<tr>
  <td id="klickpfad" colspan="2">
  </td>
</tr>
<tr>
	<td id="MENU_LEFT">
		<div class="blau">
		<div class="menu1_level1_no" align="left">Stubü</div>
        <div class="menu1_level1_no" align="left">Download</div>
		<div class="menu1_level1_act" align="left">Ressorts</div>	
	    <div class="menu1_level2_no" align="left">Sport</div>
	  	<div class="menu1_level1_no" align="left">Finanzen</div>
		</div>
	</td>
	<td id="content">
		<div class="bodytext">Content</div>
	</td>
</tr>
<tr>
	<td colspan="2">
	Kontakt Impressum
	</td>
</tr>
<tr>
</table> 
</body>
</html>