Zum Inhalt springen

Foldout Menu Farb u. Imagewechsel

Erstellt am 7. November 2008 · 2 Antworten · letzte Antwort am 9. November 2008

Tags: Frage

crossl ·

Ich verwende die Foldoutmenu Extension in Typo3 4 - das klappt auch soweit ganz gut.
Ich hätte aber gerne eine andere Farbe und ein anderes Image beim Aktivem Menüpunkt, und
das bekomme ich nicht hin.

Hier der Auszug aus meinem TS-Setup:

includeLibs.foldoutmenu = typo3conf/ext/foldoutmenu/foldoutmenu.php
....

  MARKER = HMENU
                INPAGE_LE {
				    entryLevel = 1
                    wrap = <ul>|</ul>
                    1 = TMENU
                    1 {
                      expAll = 0
                      itemArrayProcFunc = user_foldoutMenu->getIfSubUidList
                      NO {
                         allWrap = <li>|</li>
                      }
                      IFSUB < .NO
                      IFSUB = 1
                      IFSUB {
                          subst_elementUid = 1
                          doNotLinkIt = 0
                          stdWrap.cObject = COA
                          stdWrap.cObject {
                              10 = IMAGE
                              10.file = fileadmin/images/button_gr2.gif
							  10.offset=0,0
                              10.params = id="bmenu-{elementUid}-0"
                              20 = TEXT
                              20.field = title
							  20.fontFile=fileadmin/fonts/arial.ttf
							  20.fontColor=#6b6f72
                              20.fontSize=11
							  20.offset=10,12

                          }
						
                          linkWrap = <a onmousedown="bmenu.foldMenu('bmenu-{elementUid}');return false;" style="cursor: pointer;">|</a>
                          allWrap = <li>|<ul id="bmenu-{elementUid}">
                          wrapItemAndSub = |</ul></li>
                      }
                    }

						
                    2 < .1

                    10 = TEXT
                    10.data = register:ifSubUidList
                    10.postUserFunc = user_foldoutMenu->JSWrapper
                    10.postUserFunc.prefix = bmenu
                    10.postUserFunc.autoFold = 1
                    10.postUserFunc.startFolded = 1
                    10.postUserFunc.foldCurrent = 1
                    10.postUserFunc.imagePath = fileadmin/images/
                    10.postUserFunc.imageSwap = ["button_gr2.gif","button_r.jpg"]
                    10.required = 1
                }

Dabei steht button_gr2.gif vor den Menüs der Ebene 1.
Das aktuelle Menü soll ROT fontColor=#6b6f72 e3001b dargestellt sein. Und wenn es ein Menü der 1. Ebene ist, soll
auch ein anderes Image davor erscheinen button_r.gif.

Wäre super, wenn das jemand lösen könnte!

crossl ·

Ich habe das mal mit CUR probiert - aber der Farbwechsel wird nicht ausgeführt ???

               INPAGE_LE = HMENU
                INPAGE_LE {
				    entryLevel = 1
                    wrap = <ul>|</ul>
                    1 = TMENU
                    1 {
                      expAll = 0
                      itemArrayProcFunc = user_foldoutMenu->getIfSubUidList
                      NO {
                         allWrap = <li>|</li>
                      }
                      IFSUB < .NO
                      IFSUB = 1
                      IFSUB {
                          subst_elementUid = 1
                          doNotLinkIt = 0
                          stdWrap.cObject = COA
                          stdWrap.cObject {
                              10 = IMAGE
                              10.file = fileadmin/images/button_gr2.gif
							  10.offset=0,0
                              10.params = id="bmenu-{elementUid}-0"
                              20 = TEXT
                              20.field = title
							  20.fontFile=fileadmin/fonts/arial.ttf
							  20.fontColor=#6b6f72
                              20.fontSize=11
							  20.offset=10,12

                          }
						
                          linkWrap = <A onmousedown="bmenu.foldMenu('bmenu-{elementUid}');return false;" style="cursor: pointer;">|</A>
                          allWrap = <li>|<ul id="bmenu-{elementUid}">
                          wrapItemAndSub = |</ul></li>
                      }
                      CUR < .NO
					  CUR=1
                      CUR{
                          stdWrap.cObject = COA
                          stdWrap.cObject {

							  40 = TEXT
                              40.field = title
							  40.fontFile=fileadmin/fonts/arial.ttf
							  40.fontColor=#e3001b
                              40.fontSize=11
							  40.offset=10,12
						  }
                       }
                   }

						
                    2 < .1
					

                    10 = TEXT
                    10.data = register:ifSubUidList
                    10.postUserFunc = user_foldoutMenu->JSWrapper
                    10.postUserFunc.prefix = bmenu
                    10.postUserFunc.autoFold = 1
                    10.postUserFunc.startFolded = 1
                    10.postUserFunc.foldCurrent = 1
                    10.postUserFunc.imagePath = fileadmin/images/
                    10.postUserFunc.imageSwap = ["button_gr2.gif","button_r.jpg"]
                    10.required = 1
                }

Hat das etwas mit den CSS Einstellungen von <a> zutun? Aber da habe ich auch schon probiert...

#inpage_le a:link,
a:visited,
a:active {
	text-decoration:none;
	color: #6b6f72;
}

#inpage_le a:hover {
	color: #e3001b;
}
crossl ·

Ich konnte das jetzt lösen, mit ATAGPARAMS und CSS - wenn's jemanden interessiert:

TS-Code:

                INPAGE_LE = HMENU
                INPAGE_LE {
				    entryLevel = 1
                    wrap = <ul>|</ul>
                    1 = TMENU
                    1 {
                      expAll = 0
                      itemArrayProcFunc = user_foldoutMenu->getIfSubUidList
                      NO {
                         allWrap = <li>|</li>
                      }
                      IFSUB < .NO
                      IFSUB = 1
                      IFSUB {
                          subst_elementUid = 1
                          doNotLinkIt = 0
                          stdWrap.cObject = COA
                          stdWrap.cObject {
                              10 = IMAGE
                              10.file = fileadmin/images/button_gr2.gif
							  10.offset=0,0
                              10.params = id="bmenu-{elementUid}-0"
                              20 = TEXT
                              20.field = title
							  20.fontFile=fileadmin/fonts/arial.ttf
							  20.fontColor=#6b6f72
                              20.fontSize=11
							  20.offset=10,12

                          }
						
                          linkWrap = <A onmousedown="bmenu.foldMenu('bmenu-{elementUid}');return false;" style="cursor: pointer;">|</A>
                          allWrap = <li>|<ul id="bmenu-{elementUid}">
                          wrapItemAndSub = |</ul></li>
                      }
                      CUR < .NO
					  CUR=1
                      CUR{
                          stdWrap.cObject = COA
                          stdWrap.cObject {

							  40 = TEXT
                              40.field = title
							  40.fontFile=fileadmin/fonts/arial.ttf
							  40.fontColor=#e3001b
                              40.fontSize=11
							  40.offset=10,12
						  }
						  ATagParams = class="neu"
						  linkWrap = <A onmousedown="bmenu.foldMenu('bmenu-{elementUid}');return false;" style="cursor: pointer;">|</A>
                          allWrap = <li>|<ul id="bmenu-{elementUid}">
                          wrapItemAndSub = |</ul></li>
                       }
                   }

						
                    2 < .1
                    10 = TEXT
                    10.data = register:ifSubUidList
                    10.postUserFunc = user_foldoutMenu->JSWrapper
                    10.postUserFunc.prefix = bmenu
                    10.postUserFunc.autoFold = 1
                    10.postUserFunc.startFolded = 1
                    10.postUserFunc.foldCurrent = 1
                    10.postUserFunc.imagePath = fileadmin/images/
                    10.postUserFunc.imageSwap = ["button_gr2.gif","button_r.jpg"]
                    10.required = 1
                }

CSS

#inpage_le a:link,
a:visited,
a:active {
	text-decoration:none;
	color: #6b6f72;
}

a.neu:link{
	text-decoration:none;
	color: #e3001b;
}

a.neu:active{
	text-decoration:none;
	color: #e3001b;
}

a.neu:visited{
	text-decoration:none;
	color: #e3001b;
}