Individual wrap for each link on HMENU in "special = browse" mode

Submitting your vote...
Not rated yet. Be the first who rates this item!
Click the rating bar to rate this item.

If you create a menu of the type "special = browse" you sometimes need different wraps for the next/previous links.

In this type of menu, optionSplit will not work, as the next/previous type of menus, doesn't have a fixed number of links (Suppose you are on the 1st page, then there's no "previous" link, but on the last page, there's no "next" link)

 

# Constants START
lib.nextprevmenu {
  menuIcon6 = <img src="fileadmin/images/umloud/menu6no.gif" width="20" height="13" border="0" alt="Menu" Title="Menu" onmouseover="this.src='fileadmin/images/umloud/menu6ro.gif'" onmouseout="this.src='fileadmin/images/umloud/menu6no.gif'" />
  menuIcon6.wrap = <div class="buttonmenu">|</div>
  nextIcon = <img src="fileadmin/images/umloud/next_no.gif" width="21" height="13" border="0" alt="Nęste" Title="Nęste" onmouseover="this.src='fileadmin/images/umloud/next_ro.gif'" onmouseout="this.src='fileadmin/images/umloud/next_no.gif'" />
  nextIcon.wrap = <div class="buttonnext">|</div>&nbsp;
  prevIcon = <img src="fileadmin/images/umloud/prev_no.gif" width="21" height="13" border="0" alt="Forrige" Title="Forrige" onmouseover="this.src='fileadmin/images/umloud/prev_ro.gif'" onmouseout="this.src='fileadmin/images/umloud/prev_no.gif'" />
  prevIcon.wrap = <div class="buttonprev">|</div>&nbsp;
}
# Constants END

# Setup START
temp.nextprevmenu = COA
temp.nextprevmenu {
  wrap = <div class="buttonbox">|</div>
   
  10 = HMENU
  10.special = browse
  10.special {
    items = prev|next|index
    prev.fields.title = {$lib.nextprevmenu.prevIcon}
    prev.fields.subtitle = {$lib.nextprevmenu.prevIcon.wrap}
    next.fields.title = {$lib.nextprevmenu.nextIcon}
    next.fields.subtitle = {$lib.nextprevmenu.nextIcon.wrap}
    index.fields.title = {$lib.nextprevmenu.menuIcon6}
    index.fields.subtitle = {$lib.nextprevmenu.menuIcon6.wrap}
  }
  10.1 = TMENU
  10.1 {
    NO {
      allWrap.field = subtitle
    }
  }
}

 

 

This snippet was submitted by Peter Klein


Top 10 Updates

Using lightbox without extension geändert am  13-Jun-2008 14:20:51
Custom field for GMENU alt text geändert am  13-Jun-2008 13:58:07
Extending typoscript properties with stdWrap geändert am  13-Jun-2008 13:54:32
Create menus using data from other tables than "pages" V2  geändert am  24-Mar-2008 13:02:09
Login geändert am  17-Mar-2008 12:47:52
Forum geändert am  17-Mar-2008 10:07:47
Who is Typo3wizard.com geändert am  26-Dec-2007 16:07:32
Menu as un-nested lists (iphone navigation) geändert am  29-Oct-2007 15:05:53
IF Conditions with AND and OR operators geändert am  16-Oct-2007 19:16:04
UserFunc to fix problems with HMENU type "special=updated"  geändert am  16-Oct-2007 18:58:40
Deutsch
Search: