Zum Inhalt springen

Submenu getrennt anzeigen

Erstellt am 7. November 2003 · 3 Antworten · letzte Antwort am 10. November 2003

Tags: Frage

Wachtda ·

hallo leute!

ich bin gerade dabei zu probieren
das submenu vom "normalen" menu getrennt
darzustellen.

meine idee:

links habe ich ganz normal ein menu, wenn eine
seite noch level2 menus hat sollen diese am rechten
rand der seite dargestellt werden.

html template:

<!-- Menu table cell: -->
		<td width="247" id="menu_1">
			<div class="menu1-level1-no"><a href="#">Menu item 1</a></div>
			<div class="menu1-level1-no"><a href="#">Menu item 2</a></div>
			<div class="menu1-level1-act"><a href="#">Menu item 3 (act)</a></div>
			<div class="menu1-level1-no"><a href="#">Menu item 2</a></div>
		</td>

		<!-- Page Content Area table cell: -->
		<td width="700" id="content">
		  <h1>Inhalt</h1>
			<p class="bodytext">Adam Seth Enos Cainan Malelehel Iared Enoch Matusale Lamech Noe Sem Ham et Iafeth filii Iafeth Gomer Magog Madai et Iavan Thubal Mosoch Thirasporro filii Gomer Aschenez et Rifath et Thogorma filii autem Iavan Elisa et Tharsis Cetthim et Dodanim.</p>
			<p class="bodytext">Filii Ham Chus et Mesraim Phut et Chanaan filii autem Chus Saba et Evila Sabatha et Rechma et Sabathaca porro filii Rechma Saba et Dadan Chus autem genuit Nemrod iste coepit esse potens in terra Mesraim vero genuit Ludim et Anamim et Laabim et Nepthuim Phethrosim quoque et Chasluim de quibus egressi sunt Philisthim et Capthurim Chanaan vero genuit Sidonem primogenitum et Heth Iebuseum quoque et Amorreum et Gergeseum Evheumque et Aruceum et Asineum Aradium quoque et Samareum et Ematheum filii Sem Aelam et Assur et Arfaxad et Lud et Aram et Us et Hul et Gothor et Mosoch Arfaxad autem genuit Sala qui et ipse genuit Heber porro Heber nati sunt duo filii nomen uni Phaleg quia in diebus eius divisa est terra et nomen fratris eius Iectan Iectan autem genuit Helmodad et Saleph et Asermoth et Iare Aduram quoque et Uzal et Decla Ebal etiam et Abimahel et Saba necnon et Ophir et Evila et Iobab omnes isti filii Iectan Sem Arfaxad Sale Heber Phaleg Raau Serug Nahor Thare Abram iste est Abraham filii autem Abraham Isaac et Ismahel et hae generationes eorum primogenitus Ismahelis Nabaioth et Cedar et Adbeel et Mabsam </p>
			
			<br />
		</td>
	    <td width="76" id="menu_2">
		    <div class="menu2-level2-no"><a href="#">Level 2 item</a></div>
			<div class="menu2-level2-no"><a href="#">Level 2 item</a></div>
		<div class="menu2-level2-act"><a href="#">Level 2 item (act)</a></div>		</td>
	</tr>

typo script:

#################
# 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



####################################
# Configuring the Auto-Parser for main template:#
####################################
plugin.tx_automaketemplate_pi1 {

   # Read the template file:
   content = FILE
   content.file = fileadmin/ims_template/main.html
   # content.file = media/uploads/crcph/main.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/ims_template/
   # relPathPrefix = media/uploads/crcph/

   }
   
   ############################
   # 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
   
   }
   
   #############
   # Menu 1 cObject#
   #############
   temp.menu_1 = HMENU
   marks.menu_1 = HMENU
   marks.menu_1.entryLevel = 1
   
   # 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>
   
      }
   
     
   # 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>
   
   }
   
   #############
   # Menu 2 cObject#
   #############
   temp.menu_2 = HMENU
   marks.menu_2 = HMENU
   marks.menu_2.entryLevel = 2
   
   # 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>
   
   }

ich bin noch ein blutiger anfänger, daher ist mein code
sicherlich nicht das beste... :o

findet ihr den fehler..?

vielen dank
daniel

Nina_Fox ·

Hi,

habe haar-genau dasselbe Problem. Wurde bestimmt schon 1000000mal gelöst, aber ich finde die Lösung einfach nicht.

Könnte sich bitte jemand erbarmen???

Thanks, Greetings #paralyzed#
Nina

Nina_Fox ·

Hi,

also bei mir lag das Problem an der temp.rightnav.2, hier muß "1" rein.... damit klappts bei mir ....

temp.rightnav = HMENU
temp.rightnav.entryLevel = 1
temp.rightnav.1 = TMENU
temp.rightnav.1 {
NO.allWrap = <img src="clear.gif" width="25" height="13" border="0" alt=""> |
NO.ATagParams= class="generic"
NO.linkWrap = |</td></tr><tr><td height="25" valign="middle" onMouseOver="this.bgColor='#F79A7C'" onMouseOut="this.bgColor='#EFEFEF'" id="rightnav">
}

Vielen Dank,

Grüße
Nina