Login / Status
developer.Resource
Home . Documentation . Document Library
Sponsors
hosted by punkt.deTYPO3 and Open Source Magazine

10.4. GMENU:

GMENU works as a object under the cObject "HMENU" and it creates graphical navigation, where each link is a separate gif-file

Property:

Data type:

Description:

Default:

RO

Boolean

RollOver configuration enabled / disabled.

If this is true, RO becomes a GIFBUILDER-object defining the layout of the menuitem when the mouse rolls over it

0

expAll

Boolean

If this is true, the menu will always show the menu on the level underneath the menuitem. This corresponds to a situation where a user has clicked a menuitem and the menu folds out the next level. This can enable that to happen on all items as default.

collapse

Boolean

If set, "active" menuitems that has expanded the next level on the menu will now collapse that menu again.

accessKey

Boolean

If set access-keys are set on the menu-links

noBlur

Boolean

Normally graphical links are "blurred" if the browser is MSIE. Blurring removes the ugly box around a clicked link.

If this property is set, the link is NOT blurred (browser-default) with "onFocus".

target

target

Target of the menulinks

self

forceTypeValue

int

If set, the &type parameter of the link is forced to this value regardless of target. Overrides the global equivalent in 'config' if set.

stdWrap

->stdWrap

Wraps the whole item using stdWrap

Example:

2 = TMENU
2 {
  stdWrap.dataWrap = <ul class=”{register :
     parentProperty}”> | </ul>
  NO {
    ...
  }
}

wrap

wrap

Wraps only if there were items in the menu!

applyTotalH

objNumsList (offset)

This adds the total height of the previously generated menuitems to the offset of the GifBuilderObj's mentioned in this list.

Example:

This is useful it you want to create a menu with individual items but a common background image that extends to the whole area behind the menu. Then you should setup the background image in each GIFBUILDER-object and include the object-number in this list.

Look at the implementation in static_template "styles.gmenu.bug"

applyTotalW

objNumsList (offset)

This adds the total width of the previously generated menuitems to the offset of the GifBuilderObj's mentioned in this list.

min

x,y (calcInt)

Forces the menu as a whole to these minimum dimensions

max

x,y (calcInt)

Forces the menu as a whole to these maximum dimensions

useLargestItemX

boolean

If set, then the width of all menuitems will be equal to the largest of them all.

useLargestItemY

boolean

If set, then the height of all menuitems will be equal to the largest of them all.

distributeX

int+

If set, the total width of all the menuitems will be equal to this number of pixels by adding/subtracting an equal amount of pixels to each menu items width.

Will overrule any setting for ".useLargestItemX"

distributeY

int+

If set, the total height of all the menuitems will be equal to this number of pixels by adding/subtracting an equal amount of pixels to each menu items height.

Will overrule any setting for ".useLargestItemY"

removeObjectsOfDummy

objNumsList

If the menu is forced to a certain minimum dimension, this is a list of objects in the gifbuilder-object that is removed for this last item. This is important to do if the menuitems has elements that should only be applied if the item is actually a menuitem!!

disableAltText

boolean

If set, the alt-parameter of the images are not set. You can do it manually by “imgParams” (see below)

IProcFunc

function-name

The internal array “I” is passed to this function and expected returned as well. Subsequent to this function call the menu item is compiled by implode()'ing the array $I[parts] in the passed array. Thus you may modify this if you need to.

See example on the testsite and in media/scripts/example_itemArrayProcFunc.php

[Common Item States, see above]

+ rollover version for all, except SPC

->GIFBUILDER

+ Additional properties! See table below

This is the GIFBUILDER-options for each category of menuitem that can be generated.

NOTE: For the GMENU series you can also define the RollOver configuration for the item states. This means that you define the GIFBUILDER object for the 'Active' state by ACT and the RollOver GIFBUILDER object for the 'Active' state by ACTRO.

This pattern goes for ALL the states except the SPC state.

SPECIAL:

The ->OptionSplit function is run on the whole GIFBUILDER-configuration before the items are generated.

[tsref:(cObject).HMENU.(mObj).GMENU]

Additional properties for Menu item states:

These properties are additionally available for the GMENU item states although the main object is declared to be GIFBUILDER.

It is evident that it is an unclean solution to introduce these properties on the same level as the GIFBUILDER object in a single situation like this. However this is how it irreversibly is and has been for a long time.

Property:

Data type:

Description:

Default:

noLink

boolean

If set, the item is NOT linked!

imgParams

params

Parameters for the <img>-tag

altTarget

string

Alternative target which overrides the target defined for the GMENU

altImgResource

imgResouce

Defines an alternative image to use. If an image returns here, it will override any GIFBUILDER configuration.

ATagParams

string

Additional parameters

ATagTitle

string /stdWrap

which defines the title attribute of the a-tag. (See TMENUITEM also)

additionalParams

string /stdWrap

Define parameters that are added to the end of the URL. This must be code ready to insert after the last parameter.

For details, see typolink->additionalParams

wrap

wrap

Wrap of the menu item

allWrap

wrap /stdWrap

Wraps the whole item

subst_elementUid

boolean

If set, "{elementUid}" is substituted with the item uid.

allStdWrap

->stdWrap

stdWrap of the whole item

[tsref:(cObject).HMENU.(mObj).GMENU.(itemState)]