Zum Inhalt springen

content variabel, wenn rechtes menü (nicht) vorhanden???

Erstellt am 21. Juni 2004 · 10 Antworten · letzte Antwort am 14. Juli 2004

Tags: Templates & Layouts, Frage

michlbeck ·

so, jetzt hab ich mein menü soweit.
linke seite ebene 1 und 2
rechte seite ebene 3 und 4
meine setup:
# 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/
}

# Menu 1 cObject
temp.menu_1 = HMENU
# First level menu-object, textual
temp.menu_1.1 = TMENU

temp.menu_1.1 {
expAll = 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>
}

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

}

# Second level menu-object, textual
temp.menu_2 = HMENU
temp.menu_2.entryLevel = 2
temp.menu_2.1 = TMENU
temp.menu_2.1 {
# Normal state properties
NO.allWrap = <div class="menu2-level1-no"> | </div>
# Enable active state and set properties:
ACT = 1
ACT.allWrap = <div class="menu2-level1-act"> | </div>
}
# Second level menu-object, textual
temp.menu_2.2 = TMENU
temp.menu_2.2 {
# Normal state properties
NO.allWrap = <div class="menu2-level2-no"> | </div>
# Enable active state and set properties:
ACT = 1
ACT.allWrap = <div class="menu2-level2-act"> | </div>

}

# 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 ###menu_2### subpart with dynamic menu:
subparts.menu_2 < temp.menu_2

# 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

------------------------------------------
jetzt würde ich nur noch gern folgendes haben:
also jeder menüpunkt der ebene 1 hat auch menüpunkte der ebene 2, aber nicht immer ebene 3 und 4. jetzt soll der content, wenn ebene 3 und 4 nicht vorhanden sind, auch über den bereich gehen, in dem das rechte menü ist. wenn ebene 3 und 4 vorhanden sind soll der content zwischen dem menü rechts und links sein, so, wie es zur zeit noch immer ist.

kann mir da jemand weiterhelfen???

Tiuri ·

Bau die rechte Seite in den wrap der Ebene drei ein und baue die mittlöere Tabellenspalte (vermute ich mal) flexibel (width="99%"). Dann geht das ganz easy.

michlbeck ·

da ich sozusagen noch ein greenhorn bin würde mich interessieren, wie ich die rechte seite in den wrap einbaue?

michlbeck ·

<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="#internalStyle" type="text/css"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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">

<tr>
<td colspan="3" id="header_1" width="800"><img src="images/headerimage.jpg" width="800" height="100" alt="" border="0"></td>
</tr>

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

<tr>
<td colspan="3" id="footer"> <p>boonverein</p></td>
</tr>

</table>
</body>
</html>

Tiuri ·

<tr>
<td id="menu_1"> ###menu1### </td>
<td id="content"> ###inhalt### </td>
<td id="menu_2"> ###menu2### </td>
</tr>

Ich vermute mal, so sieht das ganze aus .... daraus machst Du:

<td id="menu_1"> ###menu1### </td>
<td id="content"> ###inhalt### ###menu2###  </td>

und dann im template:<td id="menu_2">

temp.menu_2.wrap=</td><td id="menu_2"> |

da menu2 nur ausgefüllt wird, wenn ein menü da ist, aber der marker immer weg ist, wird der zellenwechsel nur bei vorhandenem Menü ausgegeben. Die Ausrichtung der Zellen ist HTML-Standardspielerei.
Solltest Du damit Probleme haben, wäre es vielleicht sinnvoller, keine Auto-Vorlage zu nehmen, sondern diese selbst einzubauen.

michlbeck ·

und wo muss die zeile:

temp.menu_2.wrap=</td><td id="menu_2"> |

rein im template? doch in das setup, nur wo da und muss evtl was raus?

ich kapiers nicht...

Tiuri ·

[​quote="michlbeck"]und wo muss die zeile:

temp.menu_2.wrap=</td><td id="menu_2"> |

rein im template?

Na sicher hinter

temp.menu_2 = HMENU
michlbeck schrieb

doch in das setup, nur wo da und muss evtl was raus?

nei muss nicht, sonst hätte ichs doch geschrieben.

michlbeck schrieb

und das mit "auto-vorlage" hab i garnicht kapiert

Was gibts denn da nicht zu kapieren?
Also ich bin nicht bereit, hier eine komplette Lösung für Dich hinzulegen, dafür ist mir meine Zeit zu wertvoll. Wenn Du mit einer komplexen Lösung Schwierigkeiten hast, wie wärs dann erst mal mit einem einfacheren Projekt?

michlbeck ·

ne, musst du nicht, aber ich probier jetzt über ne woche dabei rum und auch mit deiner lösung funktioniert es nicht