Zum Inhalt springen

Frage zum GMENU

Erstellt am 26. Juli 2006 · 6 Antworten · letzte Antwort am 27. Juli 2006

Tags: Frage

sarefa ·

Hallo zusammnen,

ich habe eine Frage bezüglcih eines GMENUs:

Ich habe mir ein GMENU nach den super Tuts von hier erstellt, nun stehe ich jedoch vor einem unlösbaren Probelm von einem Typo3 Neuling. Kann man den Zustand der Navigation beim Rollover noch beeinflußen? Im Detail würde das also so ausehen:

- ich habe ein normale GMENU
- in "Normal" Zustand hat die Schrift die Farbe rot
- beim RollOver(RO) soll sich nun also die Schrift des gehoverten Links weiss färben, die der anderen nicht gehoverten (Zustand NO) jedoch schwarz

Nun meine Frage: Geht das? Wenn ja wie ?

Hier mal mein TS:

temp.menuLeft = HMENU
temp.menuLeft.special = directory
temp.menuLeft.special.value = 10
temp.menuLeft.excludeUidList = 59,51,52,95,96,97,98,99,100
temp.menuLeft {
1=GMENU
	1 {
		wrap = <ul id="nav"><span onmouseover="da();" onmouseout="weg();">|</span></ul>
		expAll = 1
		noBlur = 1    
	
		
		NO = 1    
		NO {
    allWrap = <li class="menuparent"><span onmouseover="da();" onmouseout="weg();">|</span>
    XY =363,19
    backColor = #2A3D43
    transparentBackground = 1
    noBlur = 1    
    10 = TEXT
    10.text.field = subtitle
    10.text.case = lower
    10.fontColor = #ffffff
    10.fontFile = fileadmin/fonts/FAGOEBLC.TTF
    10.fontSize = 18
    10.antiAlias = 1
    10.offset = 0,18
    10.niceText = 1
    wrapItemAndSub = <li><span onmouseover="da();" onmouseout="weg();">|</span></li>
		}

    
		ACT = 1
    ACT{
    allWrap = <li class="menuparent"><span onmouseover="da();" onmouseout="weg();">|</span>
    XY =363,19
    backColor = #334046
    transparentBackground = 1
    wrapItemAndSub = <li><span onmouseover="da();" onmouseout="weg();">|</span></li>
    noBlur = 1
    10 = TEXT
    10.text.field = subtitle
    10.text.case = lower
    10.fontColor = #babc9c
    10.fontFile = fileadmin/fonts/FAGOEBLC.TTF
    10.fontSize = 18
    10.antiAlias = 1
    10.offset = 0,18
    10.niceText = 1    
    }

	RO < .NO
	RO{
    allWrap = <li class="menuparent"><span onmouseover="da();" onmouseout="weg();">|</span>
    XY =363,19
    backColor = #ffffff
    transparentBackground = 1
    wrapItemAndSub = <li><span onmouseover="da();" onmouseout="weg();">|</span></li>
    noBlur = 1
    10 = TEXT
    10.text.field = subtitle
    10.text.case = lower
    10.fontColor = #babc9c
    10.fontFile = fileadmin/fonts/FAGOEBLC.TTF
    10.fontSize = 18
    10.antiAlias = 1
    10.offset = 0,18
    10.niceText = 1
  }
	
		
	CUR = 1
	CUR{
    allWrap = <li class="menuparent"><span onmouseover="da();" onmouseout="weg();">|</span>
    XY =363,19
    backColor = #2A3D43
    transparentBackground = 1
    noBlur = 1
    10 = TEXT
    10.text.field = subtitle
    10.text.case = lower
    10.fontColor = #babc9c
    10.fontFile = fileadmin/fonts/FAGOEBLC.TTF
    10.fontSize = 18
    10.antiAlias = 1
    10.offset = 0,18
    10.niceText = 1
	}
}

######################################################################################################


2=GMENU
	2 {
		wrap = <ul id="nav">|</ul>
		expAll = 1
		noBlur = 1

		NO = 1    
		NO {
    allWrap = <li>|</li>
    XY =240,21
    backColor = #ffffff
    transparentBackground = 1
    noBlur = 1    
    11 = TEXT
    11.text.field = subtitle
    11.fontColor = #36382D
    11.fontFile = fileadmin/fonts/FAGONRGL.TTF
    11.fontSize = 13
    11.antiAlias = 1
    11.offset = 0,18
    11.niceText = 1
    wrapItemAndSub = <li>|</li>
    
		}
    
    
		ACT <.NO
    ACT{
    XY =240,21
    backColor = #ffffff
    transparentBackground = 1
    wrapItemAndSub = <li>|</li>
    noBlur = 1
      
    11 = TEXT
    11.text.field = subtitle
    11.fontColor = #36382D
    11.fontFile = fileadmin/fonts/FAGONRGL.TTF
    11.fontSize = 13
    11.antiAlias = 1
    11.offset = 0,18
    11.niceText = 1    
    
    }
    
    

	RO < NO 
	RO = 1
	RO{
    XY =240,21
    backColor = #ffffff
    transparentBackground = 1
    wrapItemAndSub = <li>|</li>
    noBlur = 1
    11 = TEXT
    11.text.field = subtitle
    11.fontColor = #A1A79B
    11.fontFile = fileadmin/fonts/FAGONRGL.TTF
    11.fontSize = 13
    11.antiAlias = 1
    11.offset = 0,18
    11.niceText = 1
  }


	}
}

}
######################################################################################################
   temp.sub_navi = HMENU
   temp.sub_navi.entryLevel = 2
   temp.sub_navi.expAll = 0
   temp.sub_navi.excludeUidList = 11,12,13,14,15,16,17,51,52,59,83

  #temp.sub_navi.1 = TMENU
  #temp.sub_navi.1.wrap = <div>|</div><br /><br />
  #temp.sub_navi.1.expAll = 0
  
  
  temp.sub_navi{
  
  wrap  = <div>|</div>
  
  1=GMENU
	1 {
		expAll = 1
		noBlur = 1    
	
		
		NO = 1    
		NO {
    XY =[10.w]+20,19
    backColor = #ffffff
    transparentBackground = 1
    noBlur = 1    
    10 = TEXT
    10.text.field = subtitle
    10.text.case = lower
    10.fontColor = #343439
    10.fontFile = fileadmin/fonts/FAGOEBLC.TTF
    10.fontSize = 10
    10.antiAlias = 1
    10.offset = 0,18
    10.niceText = 1
    wrap = <span style="display:inline;">|</span> 
		}
   
		CUR = 1    
		CUR {
    XY =[10.w]+20,19
    backColor = #ffffff
    transparentBackground = 1
    noBlur = 1    
    10 = TEXT
    10.text.field = subtitle
    10.text.case = lower
    10.fontColor = #92202D
    10.fontFile = fileadmin/fonts/FAGOEBLC.TTF
    10.fontSize = 10
    10.antiAlias = 1
    10.offset = 0,18
    10.niceText = 1
    wrap = <span style="display:inline;">|</span> 
		}   

		ACT = 1    
		ACT {
    XY =[10.w]+20,19
    backColor = #ffffff
    transparentBackground = 1
    noBlur = 1    
    10 = TEXT
    10.text.field = subtitle
    10.text.case = lower
    10.fontColor = #92202D
    10.fontFile = fileadmin/fonts/FAGOEBLC.TTF
    10.fontSize = 10
    10.antiAlias = 1
    10.offset = 0,18
    10.niceText = 1
    wrap = <span style="display:inline;">|</span> 
		} 
    
    
		RO = 1    
		RO {
    XY =[10.w]+20,19
    backColor = #ffffff
    transparentBackground = 1
    noBlur = 1    
    10 = TEXT
    10.text.field = subtitle
    10.text.case = lower
    10.fontColor = #92202D
    10.fontFile = fileadmin/fonts/FAGOEBLC.TTF
    10.fontSize = 10
    10.antiAlias = 1
    10.offset = 0,18
    10.niceText = 1
    wrap = <span style="display:inline;">|</span> 
		} 


	} #ende 1
   
} # ende temp.sub_navi 




   temp.sub_navi_bot = HMENU
   temp.sub_navi_bot.entryLevel = 3
   temp.sub_navi_bot.expAll = 0
   temp.sub_navi_bot.excludeUidList = 11,12,13,14,15,16,17,51,52,59

  
temp.sub_navi_bot{
  
  wrap  = <div class="sub_navi">|</div>
  
  1=TMENU
	1 {
		
		NO = 1    
		NO {
    10 = TEXT
    10.text.field = title
    ATagParams = class="sub_navi"
		}


		CUR = 1    
		CUR {
    10 = TEXT
    10.text.field = title
    ATagParams = class="sub_navi_act"
		}

		ACT = 1    
		ACT {
    10 = TEXT
    10.text.field = title
    ATagParams = class="sub_navi"
		}


	} #ende 1
   
} # ende temp.sub_navi 




######################################################################################################
temp.service_navi = HMENU
temp.service_navi.special = directory
temp.service_navi.special.value = 19
temp.service_navi.1 = TMENU

temp.service_navi.1  {
  
  NO = 1 
  NO {
    20 = TEXT
    20.text.field = title
   ATagParams = class="f1"
   linkWrap = |
  }
  
  RO < NO 
  RO{
    20 = TEXT
    20.text.field = title
   ATagParams = class="f1"
   linkWrap = |  
  }
  
  ACT = 1 
  ACT {
    20 = TEXT
    20.text.field = title
   ATagParams = class="f1"
   linkWrap = |
  }
}


###################################################################################################################################
   HomeHeader = COA
   HomeHeader {
   11 < styles.content.getLeft
   11.stdWrap.ifEmpty.cObject = CONTENT
   11.stdWrap.ifEmpty.cObject {
   table = tt_content
   select {
      pidInList = 87
      orderBy = sorting
      # Nur die Objekte aus der rechten Spalte einsetzen
      where = colPos = 1 
      # Die Objekte mit der korrekten Sprache benutzen
      languageField = sys_language_uid
    }
  }
}


   HomeFooter = COA
   HomeFooter {

   12 < styles.content.getBorder

   12.stdWrap.ifEmpty.cObject = CONTENT
   12.stdWrap.ifEmpty.cObject {
   table = tt_content
   select {
      pidInList = 91
      begin = 0
      max = 1
      orderBy = sorting
      where = colPos = 3
      languageField = sys_language_uid
    }
  }
}


   HomeBg = COA
   HomeBg {

   13 < styles.content.getBorder

   13.stdWrap.ifEmpty.cObject = CONTENT
   13.stdWrap.ifEmpty.cObject {
   table = tt_content
   select {
      pidInList = 92
      begin = 1
      max = 1
      orderBy = sorting
      where = colPos = 3
      languageField = sys_language_uid
    }
  }
}

###################################################################################################################################

# Configuring the Auto-Parser for main template:

plugin.tx_automaketemplate_pi1 {

    # Read the template file:

  content = FILE

  content.file = fileadmin/templates/follow.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

    DIV.all = 1

  }

    # Prefix all relative paths with this value:

  relPathPrefix = fileadmin/templates/

}

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

    # Substitute the ###mask### subpart with dynamic menu:
    subparts.mask2 =

    # Substitute the ###menu_1### subpart with dynamic menu:
    subparts.navi_1 < temp.menuLeft

    # Substitute the ###navi2_top### subpart with dynamic menu:
		  subparts.navi2_top < temp.sub_navi

    # Substitute the ###navi2_bot### subpart with dynamic menu:
      subparts.navi2_bot < temp.sub_navi_bot

    # Substitute the ###header_img### subpart with dynamic menu:
    subparts.header_img < HomeHeader
    

    # Substitute the ###footer_img### subpart with dynamic menu:
    subparts.footer_img < HomeFooter


    # Substitute the ###footer_content### subpart with dynamic menu:
    subparts.footer_content < temp.service_navi

    # Substitute the ###logo### subpart with dynamic data:
    subparts.logo < styles.content.getLeft
    subparts.logo {
     select.pidInList = 88 
     select.orderBy = sorting
     select.where = colPos = 1
     }


    # Substitute the ###teaser### subpart with dynamic content:
     subparts.teaser < styles.content.getRight
     subparts.teaser {
     select.orderBy = sorting
     select.where = colPos = 2
     renderObj.stdWrap.wrap = <div class="teaser_content">|</div>
     }

    # Substitute the ###copy### subpart with dynamic content:
     subparts.copy < styles.content.get
     subparts.copy {
     select.orderBy = sorting
     select.where = colPos = 0
     }
     
     
    # Substitute the ###col_right### subpart with dynamic content:
    subparts.col_right < styles.content.getRight
    subparts.col_right {
     select.orderBy = sorting
    select.where = colPos = 2
    }
    #wrap = div id="col_right">div class="element_right">|</div></div>

    # Substitute the ###head### subpart with dynamic content:
     subparts.head < HomeBg
}

# 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


# 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.navigation < temp.menu_1

}

Ich wäre für Anregungen sehr dankbar!!!!!

LG sarefa

larsmessmer ·

Hallo sarefa

Den Hover Zustand kann man mit RO definieren.
Dies hast du ja schon gemacht, musst nur noch die Farben anpassen
10.fontColor = #ffffff

  RO < .NO
  RO = 1
  RO {
  	10.fontColor = #ffffff
     }

Gruss Lars

sarefa ·

Hi Lars,

danke erstmal für deine Antwort.
Das man den Rollover Zustand via RO verändern kann ist mir klar, doch das war nicht meine Frage 😉

Ich möchte beim Rollover nicht nur den gehoverten Link ändern, sondern das Komplette Menü.

Das heisst also im Detail das sich beim Rollover die Linkfarbe des kompletten Menüs inklusive des RO-Links ändern soll.

Gibt es da eine Möglichkeit?

gruß sarefa[/b]

sarefa ·

Hallo Georg,

danke für deine schnelle Antwort.

Fällt dir ev. ein Workaround dazu ein?

Ich habe mit dem Gedanken gespielt ein 2. Menü zu generieren und das bei RO sichtbar, und das 1. unsichtbar zu machen & umgekehrt. Das jedoch würde die Seitengröße unnötig aufblähen....

Fällt dir dazu ev. noch etwas ein?

Gruß sarefa

just2b ·

Hallo,

mir fällt nicht wirklich was ein, denn ein Zustand gilt eben nur für den einen Menüpunkt, die anderen bleiben ja davon unberührt,... musst dich wohl oder übel damit abfinden...

georg