[TYPO3] GMENU use navtitle if set instead of title

Ralf Merz ralf.merz at heindl.de
Thu Jun 5 17:19:50 CEST 2008


Hi list,

after searching a lot, I could finally find out how to use the GMENU 
correctly.
I want to show the navtitle, if there is one, instead of the title-field.

This is my menu:

##########
# Menu on the left, dynamic
###############################
temp.menulinks= HMENU
temp.menulinks {
   entryLevel = 1

   1 = GMENU
   1 {
     NO {
       XY = 200, 27
       backColor = #FFFFFF
       10 = IMAGE
       10.file = fileadmin/magicmaps/templates/buttons/reiter_links.gif
       20 = TEXT
       20 {
         text.field = title
         text.listNum = 0
	text.listNum.splitChar = |
         #align = center
         offset = 10,20
         fontColor = #FFFFFF
         fontFile = fileadmin/magicmaps/templates/fonts/arial_bold.ttf
         fontSize = 14
        }
     }

     RO < .NO
     RO = 1
     RO.20.fontColor = #000000
     RO.wrap = |

     CUR < .RO
     CUR = 1

     ACT < .RO
     ACT = 1


   }

... #level 2 and 3
}


so what I want to do shows this pseudo-code:
if(navtitle){
   20.text.field = navtitle
} else {
   20.text.field = title
}

I couldn´t figure it out how to do this in TS.
A TMENU does this by itself, but how can I tell the GMENU to do the same?

So, as mentioned above, I finally found out how to do this.

I´ve found this page, when TYPO3 3.3.0 was released. :)
http://sourceforge.net/project/shownotes.php?release_id=92724&group_id=20391

Searching for "nav_title" takes you to the right line.
So, the answer is:

"20.text.field" has to be

"... 20.text.field = nav_title // title"

In commerce db-tables, there´s a field "navtitle", but you also have to 
use "nav_title" in your GMENU setup.

Maybe this helps someone who is searching for this, too.
For all those "guru´s", hope you could laugh a bit. :)

Well, so in future I can also smile if someone asks me about GMENU and 
navtitle.

-- 
--
Greetings
Ralf Merz

Heindl Internet AG
Tübingen , Germany
ralf.merz at heindl.de


More information about the TYPO3-english mailing list