[TYPO3] GMENU rendering based on doktype
Ronald Renfro
rr at dreimorgen.com
Mon Aug 25 13:08:09 CEST 2008
Hi,
I would like to create a GMENU which renders the menu links depending
on page type. The images for the menu items and rollovers are taken
from the page media field.
Requirements:
1. normal pages have -> normal links and rollover
2. not in menu pages -> are included and rendered but have no link
3. external url () -> render with popup link
How can I render pages that have a doktype 3 (external url) with a
popup link?
Thanks in advance!
Ronald
This is my current TS:
PICTSPACE.1 = GMENU
PICTSPACE.1 {
NO {
# set img size to length of text obj
XY = 50,50
backColor = #FFFFFF
transparentBackground=0
20 = IMAGE
20 {
// default image from tmpl
file = {$template.path}/images/blank_50.gif
// override it with an image inserted in page
properties in field
file.import.data = levelmedia: -1, "slide"
file.import = uploads/media/
file.import.listNum = 0
file.import.override.field = media
border = 0
altText = Section Image
titleText = Section Image
}
// this takes care of requirement 2
allStdWrap.override.cObject = COA
allStdWrap.override.cObject {
if {
value = 5
equals.field = doktype
}
20 = IMAGE
20 {
// default image from tmpl
file = {$template.path}/images/blank_50.gif
// override it with an image inserted in page properties in field
file.import.data = levelmedia: -1, "slide"
file.import = uploads/media/
file.import.listNum = 0
file.import.override.field = media
border = 0
altText = Section Image
titleText = Section Image
}
stdWrap.wrap = |
stdWrap.required = 1
}
} // end NO
}
#--------------------------------------------------------------
## PICTSPACE FIRST LEVEL RO
#--------------------------------------------------------------
PICTSPACE.1.RO = 1
PICTSPACE.1.RO < PICTSPACE.1.NO
PICTSPACE.1.RO.20 {
// default image from tmpl
file = {$template.path}/images/blank_50.gif
// override it with an image inserted in page properties in field
file.import.data = levelmedia: -1, "slide"
file.import = uploads/media/
file.import.listNum = 1
file.import.override.field = media
border = 0
altText = Section Image
titleText = Section Image
}
More information about the TYPO3-english
mailing list