This page is still a beta!

Core Documentation


Chapter 10. Challenge answers

Challenge (stdWrap/1)

You can use both .date and .strftime. Each property has a data-type, "date-conf" and "strftime-conf" which is basically from the PHP-manual

page.10 = TEXT
page.10.field = crdate

page.10.date = d-m-y H:i

outputs

01-07-00 15:48

page.10 = TEXT
page.10.field = crdate

page.10.strftime = %A %e. %B, %I:%M %p

outputs

Saturday 1. July, 03:48 PM 

page.10 = TEXT
page.10.field = crdate

page.10.strftime = %A %e. %B, %I:%M %p

config.locale_all = deutsch

outputs

Samstag 1. Juli, 03:48 

Challenge (stdWrap/2)

page.10 = TEXT
page.10.data = leveltitle:-2

Challenge (stdWrap/3)

page.10 = TEXT
page.10.field = subtitle
page.10.ifEmpty = Hello world

Challenge (stdWrap/4)

page.10 = TEXT
page.10.field = subtitle
page.10.ifEmpty {
  field = title
  required = 1
  wrap = <font color="red">|</font>
}
page.10.wrap = <H3>|</H3>

.ifEmpty (from stdWrap) is a string-value with stdWrap properties, so there the party continues, using .field, .required (which returns if .field returned empty) and .wrap (which is only carried out, if .required didn't force a return)

Alternatively (using .if instead of .required)

page.10 = TEXT
page.10.field = subtitle
page.10.ifEmpty {
  field = title

  if.isTrue.field = title

  wrap = <font color="red">|</font>
}
page.10.wrap = <H3>|</H3>

Challenge (cObject/1)

page.10 = COA
# Header to this section
page.10.10 = TEXT
page.10.10 {
  value = This is the page title:
...
  20.wrap = Subtitle: <B> |</B>

  20.required=1

}

Challenge (cObject/2)

page.10 = COA

page.10.if.isTrue.field = subtitle

...

See the TSref (->if) for properties to this object. In this case ->if returns true if the fieldvalue of subtitle is not empty

Challenge (cObject/3)

page.10 = COA

page.10.if.value = 1

page.10.if.isGreaterThan.data = level:1

...

Here we compare two values. It's a bit 'backwards', but here is how it works: "if returns true if the level we're at (rootline level, starting with zero for the rootpage) is greater than the value defined by if.value"

Questions (cObject/4)

Typo3 actually scales the image.

The first example has the filename "/fileadmin/tsbyex/alligator.jpg".

The second example has the filename "typo3temp/3de305c72b.jpg". The filename is the cropped result of a md5-hash made on the serialized TypoScript configuration for the image. Notice that a change of properties for the imgResource is also a new file in the typo3temp/-folder and therefore this folder will by time collect a lot of unused images in it.

Challenge (cObject/5)

Plain version:

page.10 = IMAGE
page.10 {
  file = fileadmin/tsbyex/alligator.jpg
  file.width = 200
  imageLinkWrap = 1
  imageLinkWrap.enable = 1

  imageLinkWrap.JSwindow = 1

}

The "Rolls Royce" version:

page.10 = IMAGE
page.10 {
  file = fileadmin/tsbyex/alligator.jpg
  file.width = 200
  imageLinkWrap = 1
  imageLinkWrap.enable = 1

  imageLinkWrap.JSwindow = 1

  imageLinkWrap {

    bodyTag = <BODY bgColor=black>

    wrap = <A href="javascript:close();"> | </A>

    width = 400m

    height = 300

    JSwindow = 1

    JSwindow.expand = 22,30

  }

}

... resulting in this:

The window is closed with a click on the image which is limited to the max dimensions 400x300 pixels. The JavaScript window is sized based on the image-size but 22 and 30 pixels are added in order to put borders to the window.

Challenge (cObject/6)

page.10 = IMG_RESOURCE
page.10 {
  file = fileadmin/tsbyex/alligator.jpg
  file.width = 200
}
page.10.stdWrap.wrap = <table border=1 cellpadding=30 background="|"><tr><td><BR><font color=white size=4><B>Hello World</b></font></td></tr></table>

(last line is one line!)

Challenge (cObject/7)

page.5 = TEXT
page.5.value = Before ruler

page.5.wrap = | <BR>

page.10 = HRULER
page.10 {
  lineThickness = 3
  lineColor = red
}

page.10.stdWrap.spaceAfter = 20

page.10.stdWrap.spaceBefore = 10

page.15 = TEXT
page.15.value = After ruler

This results in:

Notice that we had to set a <BR> tag after the "Before ruler" text. If not, the space above didn't work.

The HTML-source code:

Before ruler<BR>
<img src="clear.gif" width=1 height=10 border=0><BR>
<table border=0 cellspacing=0 cellpadding=0 width=99%>
  <tr>
    <td bgColor="red"><img src="clear.gif" width=1 height=3></td>
  </tr>
</table>
<img src="clear.gif" width=1 height=20 border=0><BR>
After ruler

Challenge (cObject/8)

page.bodyTagMargins = 0

page.10 = OTABLE
page.10 {

  tableParams = border=0 cellpadding=0 cellspacing=0 width=1

  offset = 0,20

  10 = TEXT
  10.value = What a cute little alligator! Dear Lord, may it never grow up!
  10.wrap = |<BR>
  20 = IMAGE
  20.file = fileadmin/tsbyex/alligator.jpg
  20.file.width=200

  30 = CLEARGIF

  30.width=250

  30.stdWrap.wrap = <BR> |

}

Challenge (cObject/9)

page.10 = TEMPLATE
page.10 {
  template = FILE
  template.file = fileadmin/tsbyex/template.html
  workOnSubpart = DOCUMENT
  marks.SIMPLE_WORD = TEXT
  marks.SIMPLE_WORD.field = title
  subparts.LINK = TEXT
  subparts.LINK.current = 1
  subparts.LINK.typolink {

    parameter.data = leveluid:1

    wrap = <B>|</B>

    target = _blank

  }
}

Challenge (PHP_SCRIPT1)

See fileadmin/tsbyex/test_calculate.inc

Try this TypoScript (with your test template):

page.10 = PHP_SCRIPT
page.10.file = fileadmin/tsbyex/test_calculate.inc

This is the output:

Try to input some numbers and click "Calculate!"

This is the codelisting:

<?
if (is_object($this)){
if (t3lib_div::GPvar("submit")){
// Calculate result.
// Disable cache, because the result must not be cached:
$GLOBALS["TSFE"]->set_no_cache();
// Get values:
$value_1 = t3lib_div::GPvar("value_1");
$value_2 = t3lib_div::GPvar("value_2");
// Output result:
$content.="Result is: ".($value_1 + $value_2);
} else {
// Draw the form:
$content.='
<form action="index.php?id='.$GLOBALS["TSFE"]->id.'&type='.$GLOBALS["TSFE"]->type.'&no_cache=1" method="POST">
<input type="Text" name="value_1"> + <input type="Text" name="value_2"> =<br>
<input type="Submit" name="submit" value="Calculate!">
</form>
';
}
} else die("You MUST include this script as a PHP_SCRIPT cObject.");
?>

Especially I would like you to notice that the URL of the form is the current page and that the &no_cache=1 parameter is sent. That parameter forces the index_ts.php script to "execute" the TypoScript template (thereby rendering the cObjects). If that parameter is not set, we might instead of getting the result, see the form again, because the form is cached!

When the result is displayed, the cache is already disable if the &no_cache parameter is sent. But in case it isn't, we make sure that the page is not cached with the $GLOBALS["TSFE"]->set_no_cache() function.

Challenge (PHP_SCRIPT2)

In your include-scripts you can use the function $this->enablefields("[table-name]") to get a part of a WHERE-clause the deselects records from a table if they are either hidden or timed or user-disabled - based on the settings in tables.php. So that's why it's brilliant! It provides a bulletproof way for you to make correct SQL-queries with respect to the hidden, start-/endtime and fe_group features of record - if these features appear.

Try this example:

In your template (your test template)

page.10 = PHP_SCRIPT
page.10.file = fileadmin/tsbyex/test_enablefields.inc

Hit the site:

|pages|| AND NOT pages.deleted AND NOT pages.hidden AND (pages.starttime<=985903309) AND (pages.endtime=0 OR pages.endtime>985903309) AND pages.fe_group IN (0,-1)|
|tt_content|| AND NOT tt_content.deleted AND NOT tt_content.hidden AND (tt_content.starttime<=985903309) AND (tt_content.endtime=0 OR tt_content.endtime>985903309) AND tt_content.fe_group IN (0,-1)|
|tt_address|| AND NOT tt_address.deleted AND NOT tt_address.hidden|

As you can see, the function outputs (by the debug() function, see the file fileadmin/tsbyex/test_enablefields.inc) the WHERE-clauses returned.

For all tables, "pages", "tt_content" and "tt_address" the field deleted cannot be true. The deleted field is set for  deleted records in Typo3. Also all tables is checked for their hidden-fields

But apparently the table "tt_address" doesn't have the startime and endtime fields opposite to "pages" and "tt_content".

A quick check in tables.php:

(pages)

...
$tc[pages] = Array (
"ctrl" => Array (
"label" => "title",
"tstamp" => "tstamp",
"sortby" => "sorting",
"title" => "Page|Side|Seite|Side|Pagina|Page",
"type" => "doktype",
"delete" => "deleted",
"crdate" => "crdate",
"cruser_id" => "cruser_id",

"enablecolumns" => Array (

"fe_group" => "fe_group",

"disabled" => "hidden",

"starttime" => "starttime",

"endtime" => "endtime"

),

"mainpalette" => 1,
"useColumnsForDefaultValues" => "doktype,fe_group,hidden"
...

(tt_content)

$tc[tt_content] = Array (
"ctrl" => Array (
"label" => "header",
"sortby" => "sorting",
"tstamp" => "tstamp",
"title" => "Pagecontent|Sideindhold|Seiteninhalt|Sideinnhold|Contenuto pagina|Contenu de la page",

"delete" => "deleted",

"type" => "CType",

"enablecolumns" => Array (

"fe_group" => "fe_group",

"disabled" => "hidden",

"starttime" => "starttime",

"endtime" => "endtime"

),

"typeicon_column" => "CType",
"typeicons" => Array (
...

(tt_address)

$tc[tt_address] = Array (
"ctrl" => Array (
"label" => "name",
"default_sortby" => "ORDER BY name",
"tstamp" => "tstamp",

"delete" => "deleted",

"title" => "Address|Adresse|Adresse|Adresse|Indirizzo:",

"enablecolumns" => Array (

"disabled" => "hidden"

),

"thumbnail" => "image"
),
...

These examples show where the "enablefields" are configured.

Codelisting of "/fileadmin/tsbyex/test_enablefields.inc"

<?
debug("pages",1);
debug($this->enableFields("pages"),1);
debug("tt_content",1);
debug($this->enableFields("tt_content"),1);
debug("tt_address",1);
debug($this->enableFields("tt_address"),1);
?>

Challenge (imgResource/1)

page.bgImg.import {
  cObject = TEXT
  cObject.value = fileadmin/tsbyex/alligator.jpg  
  cObject.override {
    required = 1
    field = media
    listNum = 1
    wrap = uploads/media/ | 
  }
}
page.bgImg.width = 200

You're going to figure that out yourself...

Challenge (GIFBUILDER/1)

page.10 = IMAGE
page.10.file = GIFBUILDER
page.10.file {
  XY = [20.w]+20, 30
  backColor = olive
  20 = TEXT
  20.text.field = title
  20.offset = 10,20
  20.niceText = 1
  20.fontSize= 20
  20.fontFile = t3lib/fonts/verdana.ttf
  20.fontColor = #660000
  20.emboss {
    offset = -2,-2
    highColor = olive : +30
    lowColor = olive : -30
    blur = 30
    opacity = 80
  }
}

Result:

Notice the color definitions in the .emboss property. The TSref says that the value is "GraphicColor" which has an option that lets us arithmetically alter the color value. In this case the "high" color (light) is lightened (linear brightness value) with 30 and the "low" is likewise darkened with 30. Unfortunately Typo3 (ImageMagick...) doesn't support the blend-modes "multiply" and "screen" know from many image manipulation programs. Those modes would have been more correct in these situations.

Challenge (GIFBUILDER/2)

page.10 = IMAGE
page.10.file = GIFBUILDER
page.10.file {

  XY = 200, 160

  backColor = silver

  20 = TEXT
  20.text.field = title
  20.offset = 0,120
  20.niceText = 1
  20.align=center
  20.fontSize= 40
  20.fontFile = t3lib/fonts/verdana.ttf
  20.fontColor = yellow
    # Left, top

  30 = IMAGE

  30.file = fileadmin/tsbyex/alligator.jpg

  30.file.width=50

  30.offset = 5,5

    # Left, bottom

  31 < .30

  31.align = , b

  31.offset = 5,-5

    # Right, top

  32 < .30

  32.align = r , t

  32.offset = -5,5

    # Right, bottom

  33 < .30

  33.align = r , b

  33.offset = -5,-5

}

Result:

The .align and .offset properties are interrelated as you see. If you set align to "r,b" (right - bottom), the offset is relative to this position and you must specify "-5, -5" to push the image up and to the left.

Also notice how the TypoScript syntax is utilized to copy the first object into the other object positions thereby saving the redundancy of specifying the same filename again and again and again...

This is how it looks in the Object Browser:

Challenge (GIFBUILDER/3)

Add:

    # Left border

  40 = BOX

  40.color = red

  40.dimensions = 0,0,2,160

    # Right border

  41 < .40

  41.align = r

    # Top border

  42 < .40

  42.dimensions = 0,0,200,2

    # Bottom border

  43 < .42

  43.align = ,b

}

Result:

Challenge (TMENU/1)

...
  wrap = <tr><td nowrap> | </td></tr>
  target = page
  NO {

    afterImg =  media/bullets/bullet1_n.gif

    afterROImg = media/bullets/bullet1_h.gif

    afterImgTagParams = hspace=2

    RO = 1
    after = <br>
...

Challenge (TMENU/2)

...
    after = <br>
    ATagBeforeWrap = 1
    linkWrap= <font face=Verdana size=1 color=black> | </font>
  }
}

page.10.3 < page.10.2

page.10.3.wrap >

page.10.3.NO.before = <font size=1>&nbsp;&nbsp;&nbsp;</font>

page.10.2.expAll = 1

Result:

(In order to have enough menu items I had to move some pages from "Another site in...")

Challenge (TMENU/3)

page.10 = HMENU
page.10.1 = TMENU
page.10.1.target = page
page.10.1 {
  expAll = 1
  wrap = <table width="300" border=1 cellspacing=0 cellpadding=0><tr><td><img src="clear.gif" width=1 hspace=200 height=1 vspace=3 border=0></td></tr> | </table>
  NO.linkWrap = <font face=Arial size=2 color=black><b> |</b></font>
  NO.allWrap = <tr><td><img src="clear.gif" width=1 height=1 vspace=3 border=0><br> | </td></tr>
  NO.ATagBeforeWrap = 1

  ACT < .NO

  ACT = 1

  ACT.linkWrap = <font face=Arial size=2 color=red><b> |</b></font>

}
page.10.2 = TMENU
page.10.2 {
  wrap = <tr><td nowrap> | </td></tr>
  target = page
  NO {
    afterImg =  media/bullets/bullet1_n.gif
    afterROImg = media/bullets/bullet1_h.gif
    afterImgTagParams = hspace=2
    RO = 1
    after = <br>
    ATagBeforeWrap = 1
    linkWrap= <font face=Verdana size=1 color=black> | </font>
  }
  ACT < .NO

  ACT =1

  ACT.linkWrap = <font face=Verdana size=1 color=red> | </font>

}

Challenge (TMENU/4)

temp.challengeMenu = HMENU
temp.challengeMenu.stdWrap.wrap  = <TABLE width="200" border="0" cellspacing="0" cellpadding="0" bgcolor="#004828"><TR><TD><TABLE border="0" width="100%" cellspacing="1" cellpadding="2">|</TABLE></TD></TR></TABLE>
temp.challengeMenu.entryLevel = 0
temp.challengeMenu.1 = TMENU
temp.challengeMenu.1.target = _top
temp.challengeMenu.1.NO {
  allWrap = <TR><TD bgcolor="#638E7B" align="center" valign="top" width="5"><IMG src="/typo3/sysext/cms/tslib/media/bullets/blackdot.gif" width="5" height="9"></TD><TD bgcolor="#638E7B" width="160"> | </TD></TR>
  ATagBeforeWrap = 1
  linkWrap = <FONT face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#004B2C"> | </FONT>
  stdWrap.case = upper
}
temp.challengeMenu.1.ACT < temp.challengeMenu.1.NO
temp.challengeMenu.1.ACT = 1
temp.challengeMenu.1.ACT {
  linkWrap = <FONT face="Verdana, Arial, Helvetica, sans-serif" size="1" color="white"> | </FONT>
}
temp.challengeMenu.2 = TMENU
temp.challengeMenu.2.target = _top
temp.challengeMenu.2.NO {
  allWrap = <TR><TD colspan="2" bgcolor="#D0DCD8">|</TD></TR>
  ATagBeforeWrap = 1
  linkWrap = <FONT face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#004B2C">|</FONT>
  stdWrap.case = upper
}
temp.challengeMenu.2.ACT < temp.challengeMenu.2.NO
temp.challengeMenu.2.ACT = 1
temp.challengeMenu.2.ACT {
  allWrap = <TR><TD colspan="2" bgcolor="#FFFBE7">|</TD></TR>
  linkWrap = <FONT face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#004B2C">|</FONT>
}
page.noLinkUnderline =1
page.10 < temp.challengeMenu

Example (TMENU)

temp.leftmenu = HMENU
temp.leftmenu.entryLevel = 0
temp.leftmenu.1 = TMENU
temp.leftmenu.1.target = _top
temp.leftmenu.1.collapse = 1
temp.leftmenu.1.wrap = <table border=0 cellpadding=0 cellspacing=0> | </table>
temp.leftmenu.1.NO {
  allWrap = <TR><TD colspan=2><img src="clear.gif" width=1 height=5></TD></TR><TR><TD colspan=2> | </TD></TR>
  ATagBeforeWrap = 1
  linkWrap = <b><font face="verdana" size=1 color=black> | </font></b>
  stdWrap.case = upper
}
temp.leftmenu.2 = TMENU
temp.leftmenu.2.target = _top
temp.leftmenu.2.wrap = | <TR><TD><img src="clear.gif" width=1 height=10></TD><TD></TD></TR>
temp.leftmenu.2.NO {
  allWrap = <TR><TD><img src="clear.gif" width=10 height=1></TD><TD> | </TD></TR>
  after = <BR><img src="/typo3/sysext/cms/tslib/media/bullets/stipler3.gif" height=1 vspace=1> |*||*| <img src="clear.gif" width=1 height=1><BR>
  ATagBeforeWrap = 1
  linkWrap = <font face="verdana" size=1 color=black> | </font>
}
page.10 < temp.leftmenu

Result:

Challenge (IMGMENU/1)

...

  dWorkArea = 77,15

  NO.distrib = 0, 15

  NO.10 = TEXT
  NO.10 {
    text.field = title
    fontSize = 11
    fontColor = black
    niceText = 1
    offset = 0,0
    imgMap.explode = 3,2
  }

  NO.20 = BOX

  NO.20 {

    dimensions = 0,3,120,1

    color = white
  }
}
page.10 < temp.topmenu

Notice that the "||" from "NO.20" is removed in order to make the white line appear under every element!

Challenge (IMGMENU/2):

...
  NO.20 = BOX
  NO.20 {
    dimensions = 0,3,120,1
    color = |*| white || black |*|
  }
}

Result:

Challenge (GMENU/1)

page.10 = HMENU
page.10.1 = GMENU
page.10.1.NO {
  XY = [10.w]+20,20
  backColor = olive
  10 = TEXT
  10.text.field = title
  10.offset = 0,13
  10.align = center
  10.niceText = 1

  10.emboss {

    offset = -2,-2

    highColor = olive : +30

    lowColor = olive : -30

    blur = 30

    opacity = 80

  }

}

page.10.1.RO < page.10.1.NO

page.10.1.RO = 1

page.10.1.RO {

  10.emboss.offset = 2,2

}

Advanced Example (GMENU)

Put this in the Constants-field:

buttonH = 25
buttonColor = #ccccff

Put this in the Setup-field:

temp.topmenuText = TEXT
temp.topmenuText {
  text.field = title
  offset = 10,17
  fontFile = fileadmin/fonts/arial_bold.ttf
  fontSize = 15
  niceText = 1
}
temp.topmenu = HMENU
temp.topmenu.1 = GMENU
temp.topmenu.1.target = _top
temp.topmenu.1.accessKey = 1
temp.topmenu.1.NO {
  XY = [100.w]+22, {$buttonH}
  backColor = {$buttonColor}
  10 = IMAGE
  10.file = GIFBUILDER
  10.file {
    XY = 6,30
    backColor = {$buttonColor} : *0.5
    100 = SCALE
    100.width = 6
    100.height = {$buttonH}
  }
  10.mask = GIFBUILDER
  10.mask {
    XY = 6,30
    10 = IMAGE 
    10.file = media/buttons/maskpart1.tif
    100 = SCALE
    100.width = 6
    100.height = {$buttonH}
  }
  20 = IMAGE
  20.file = GIFBUILDER
  20.align = r
  20.file {
    XY = 6,30
    backColor = {$buttonColor} : *0.5
    100 = SCALE
    100.width = 6
    100.height = {$buttonH}
  }
  20.mask = GIFBUILDER
  20.mask {
    XY = 6,30
    10 = IMAGE 
    10.file = media/buttons/maskpart2.tif
    100 = SCALE
    100.width = 6
    100.height = {$buttonH}
  }
  30 = IMAGE
  30.file = GIFBUILDER
  30.offset = 6,0
  30.file {
    XY = [100.w]+10,{$buttonH}
    backColor = {$buttonColor} : *0.5
    100 < temp.topmenuText
    100.hide = 1
  }
  30.mask = GIFBUILDER
  30.mask {
    XY = [40.w], [40.h]
    40 = IMAGE
    40.file = media/buttons/maskpart3.tif
    60 = SCALE
    60.width = [100.w]+10
    60.height = {$buttonH}
    100 < temp.topmenuText
    100.hide = 1
  }
  100 < temp.topmenuText
}
temp.topmenu.1.RO < temp.topmenu.1.NO
temp.topmenu.1.RO=1
temp.topmenu.1.RO.100.fontColor = white
page.10 < temp.topmenu

Result:

Challenge (GMENU/2)

page.10 = HMENU
page.10.1 = GMENU
page.10.1.NO {
  XY = [10.w]+20,20
  backColor = olive
  

  4 = IMAGE

  4.file = media/buttons/middle.gif

  4.tile = 10

  5 = IMAGE

  5.file = media/buttons/left.gif

  6 = IMAGE

  6.file = media/buttons/right.gif

  6.align = r

  10 = TEXT
  10.text.field = title
  10.offset = 0,13
  10.align = center
  10.niceText = 1
}

Challenge (GMENU_LAYERS/1)

page.includeLibs.gmenu_layers = media/scripts/gmenu_layers.php
page.10 = HMENU
page.10.1 = GMENU_LAYERS
page.10.1 {
  layerStyle = position:absolute;left:0px;top:30px;width:10px;VISIBILITY:hidden; 
  xPosOffset =-10
  lockPosition = x
  expAll=1
  NO {
    backColor = #cccccc
    XY = [10.w]+10, 14
    10 = TEXT
    10.text.field = title
    10.offset = 5,10
  }
}
page.10.2 = GMENU
page.10.2.wrap = |<BR>
page.10.2.NO {

  backColor = |*| #99cccc || #99cccc : *1.2 |*|

  XY = 120, 20

  10 = TEXT
  10.text.field = title
  10.offset = 5,13
  10.niceText = 1

  20 = BOX

  20.dimensions = 0,0,2,20

  20.color = #660000

  21 < .20

  21.align = r

  22 = BOX ||

  22.dimensions = 0,0,120,2

  22.color = #660000

  23 = |*||*|    || BOX

  23.dimensions = 0,0,120,2

  23.color = #660000

  23.align = ,b

}

Result:

Comments: The GIFBUILDER objects 22 and 23 are enabled by optionSplit. In the case of "22" optionSplit assigns "BOX" as value to "22" only for the first item in the menu. In the case of "23" optionSplit assigns "BOX" as value to "23" only for the last item. Refer to the optionSplit examples in TSref.

Challenge (GMENU_LAYERS/2)

page.includeLibs.gmenu_layers = media/scripts/gmenu_layers.php
page.10 = HMENU
page.10.1 = GMENU_LAYERS
page.10.1 {
  layerStyle = position:absolute;left:120px;top:30px;width:10px;VISIBILITY:hidden; 

  yPosOffset =-30

  lockPosition = y

  expAll=1
  NO {

    wrap = |<BR>

    backColor =  |*| #ff6600 || #ff6600 : -30 |*|

    XY = 130, 15

    10 = TEXT
    10.text.field = title

    10.text.case = upper

    10.offset = 5,10

    10.niceText = 1

    10.fontFace = t3lib/fonts/verdana.ttf

    10.fontSize = 8

    10.spacing = 2

    20 < .10

  }

  RO < .NO

  RO=1

  RO.backColor = #ff9900

}
page.10.2 = GMENU
page.10.2.wrap = |<BR>
page.10.2.NO {
  backColor = |*| #99cccc || #99cccc : *1.2 |*|
  XY = 120, 20
  10 = TEXT
  10.text.field = title
  10.offset = 5,13
  10.niceText = 1
  20 = BOX
  20.dimensions = 0,0,2,20
  20.color = #660000
  21 < .20
  21.align = r
  22 = BOX ||
  22.dimensions = 0,0,120,2
  22.color = #660000
  23 = |*||*|    || BOX
  23.dimensions = 0,0,120,2
  23.color = #660000
  23.align = ,b
}

Result:

Comments:

The main thing of changing the orientation of the GMENU_LAYERS here is to rearrange the parameters for the dynamic layers:

  layerStyle = position:absolute;left:120px;top:30px;width:10px;VISIBILITY:hidden; 

  yPosOffset =-30

  lockPosition = y

When you implement the menu on a page, you'll need to tweek these parameters to fit the page-design you make in order for the menu to appear at the correct (absolute) coordinates.

Among other nifty things in this menu is

    20 < .10

This creates a copy of the textobject, because without the text tends to be too weak. So this is a workaround for the fact that we dont have the bold version of the font at hands. This is how it would look without: