Tabsmenu (TMENU) Sample

Submitting your vote...
Rating: 4.9 of 5. 10 vote(s).
Click the rating bar to rate this item.

This snippet creates a tab menu using a TMENU. The following images are used:

TYPO3Wizard.com sample Tabs Menu (TMEN) image left 1TYPO3Wizard.com sample Tabs Menu (TMENU) image right 1TYPO3Wizard.com sample Tabs Menu (TMENU) image center 1TYPO3Wizard.com sample Tabs Menu (TMENU) image center 1TYPO3Wizard.com sample Tabs Menu (TMENU) image left 2TYPO3Wizard.com sample Tabs Menu (TMENU) image right 2TYPO3Wizard.com sample Tabs Menu (TMENU) image center leftTYPO3Wizard.com sample Tabs Menu (TMENU) image center right

 

Constants:

 

lib.tabsmenu {
  imagePath = fileadmin/templates/tabs_images/
  leftImgNO = l1.gif
  rightImgNO = r1.gif
  centerImgNO = c1.gif
  leftImgACT = l2.gif
  rightImgACT = r2.gif
  centerLeftImgACT = c2l.gif
  centerRightImgACT = c2r.gif
}

 

Setup:

 

lib.tabsmenu = COA
lib.tabsmenu {
  wrap = <div id="tabsmenu">|</div>
  10 = HMENU
  10.1 = TMENU
  10.1 {
    NO {
      			# Enabled if this menuitem is LEFT of the active menuitem
      before.cObject = IMAGE
      before.cObject.file = {$lib.tabsmenu.imagePath}{$lib.tabsmenu.leftImgNO} || {$lib.tabsmenu.imagePath}{$lib.tabsmenu.centerImgNO}
      before.cObject.wrap = <div class="img">|</div>
      before.cObject.if.isTrue.data = register:curUid
      before.cObject.if.negate = 1
       
      			# Enabled if this menuitem is RIGHT of the active menuitem
      after.cObject = IMAGE
      after.cObject.file = {$lib.tabsmenu.imagePath}{$lib.tabsmenu.centerImgNO} |*||*| {$lib.tabsmenu.imagePath}{$lib.tabsmenu.rightImgNO}
      after.cObject.wrap = <div class="img">|</div>
      after.cObject.if.isTrue.data = register:curUid
      linkWrap = <div class="item">|</div>
      allWrap = |
    }
    ACT < .NO
    ACT = 1
    ACT {
      before.cObject.file = {$lib.tabsmenu.imagePath}{$lib.tabsmenu.leftImgACT} || {$lib.tabsmenu.imagePath}{$lib.tabsmenu.centerLeftImgACT}
      before.cObject.if >
      after.cObject.file =  {$lib.tabsmenu.imagePath}{$lib.tabsmenu.centerRightImgACT} |*||*| {$lib.tabsmenu.imagePath}{$lib.tabsmenu.rightImgACT}
      after.cObject.if >
      linkWrap = <div class="item2">|</div>
      stdWrap.cObject = COA
      stdWrap.cObject {
        10 = TEXT
        10.field = title
        20 = LOAD_REGISTER
        20.curUid= 1
      }
    }
  }
  	# This part adds the closing image, which will be missing in cases where there's no active menuitem 
  20 = IMAGE
  20.file = {$lib.tabsmenu.imagePath}{$lib.tabsmenu.rightImgNO}
  20.wrap = <div class="img">|</div>
  20.if.isTrue.data = register:curUid
  20.if.negate = 1
}



// --- CSS STYLES start ----------------------
page.CSS_inlineStyle (
	#tabsmenu {background: #9F0030;height:28px;padding:20px 0px 0px 0px;}
	html > #tabsmenu {height:48px;}
	#tabsmenu .img,#tabsmenu .item,#tabsmenu .item2 {float: left;}
	#tabsmenu .item {background:#810027;}
	#tabsmenu .item2 {background:#FFFFFF;}
	#tabsmenu .item A,#tabsmenu .item2 A {padding: 0px 10px;line-height:28px; font-family: Verdana;font-weight:bold;font-size: .8em;text-decoration:none;}
	#tabsmenu .item A {color: #FFFFFF;}
	#tabsmenu .item2 A {color: #000000;}
	#tabsmenu .item A:hover,#tabsmenu2 .item A:hover {text-decoration:underline;}
)
// --- CCS STYLES end ------------------------

 

Click here to see the menu

 

This snippet menu was submitted by Peter Klein




Comments


Trine, 21-10-09 07:55:
how do you get this to work?

I have added setup text - added constants text - inserted images into a the correct directory ???

Add comment

* - required field

*



*
*

Top 10 Updates

Nice fonts using Google font API geändert am  20-May-2010 16:36:47
TS-based Searchbox for Indexed Search  geändert am  18-May-2010 18:27:15
TYPO3 SEO geändert am  30-Apr-2010 09:44:22
Search engine friendly graphical headers in TYPO3 geändert am  30-Apr-2010 09:33:44
Creating a simple Infocenter using TYPO3 geändert am  17-Nov-2009 12:12:52
Making the Section Menu work correctly with TemplaVoila geändert am  05-May-2009 12:27:17
Show pages with type "Not in Menu" in a sitemap geändert am  05-May-2009 12:11:17
Implementation of the DHTML menu from brainjar.com  geändert am  01-Feb-2009 14:02:48
Sample DHTML menu geändert am  01-Feb-2009 13:51:25
A introduction to the CONTENT object geändert am  26-Jan-2009 13:20:39

Latest comments

20-Aug-2010 16:31:13
pritam schrieb: Hello, Can any body tell me how to add the realurl in the typo3.
Articles
17-Aug-2010 15:25:30
Graham Solomon schrieb: I have developed a nice extension for using this Google Font API with TYPO3, along with their web...
Nice Fonts using Google font API
12-Aug-2010 17:39:44
Ritesh Jaiswal schrieb: I have added the above code into page template but it is not working. It only index the page into...
Index search
Deutsch
Search: