Die TYPO3 Mailingliste - nicht fragen: lesen!
This is a discussion on [TYPO3] GMENU and shortcuts within the typo3-english@lists.netfielders.de forums, part of the TYPO3-Mailinglists: ENGLISH category; Hi List, I am trying to create a GMENU, where menu-items that represent shortcut-pages are visible, but with ...
|
|||||||
| Registrieren | Hilfe | Benutzerliste | Kalender | Suchen | Heutige Beiträge | Alle Foren als gelesen markieren |
|
#1
|
|||
|
|||
|
Hi List,
I am trying to create a GMENU, where menu-items that represent shortcut-pages are visible, but with their links disabled. I found several threads that provided some clues, but I haven't succeeded yet. I have tried following: 1) The stdWrap-approach NO { nolink = 1 stdWrap.cObject = CASE stdWrap.cObject { key.field = doktype 4 = TEXT default = TEXT default { field = nav_title typolink.parameter.field = uid typolink.extTarget.field = target } } This disables all links. 2) The globalVar-approach [globalVar = TSFE age|doktype = 4]lib.menu_2.1.NO { noLink = 1 } [global] This has no effect. I would appreciate any help. cheers, Mark. _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#2
|
|||
|
|||
|
Hi,
On 5/10/07, mark schoenbaechler <typo3-english (AT) lists (DOT) netfielders.de> wrote: > Hi List, > > I am trying to create a GMENU, where menu-items that represent shortcut-pages are visible, but with their links disabled. > > I found several threads that provided some clues, but I haven't succeeded yet. I have tried following: > > 1) The stdWrap-approach > > NO { > nolink = 1 > stdWrap.cObject = CASE > stdWrap.cObject { > key.field = doktype > 4 = TEXT > default = TEXT > default { > field = nav_title > typolink.parameter.field = uid > typolink.extTarget.field = target > } > } > > This disables all links. > > > 2) The globalVar-approach > > [globalVar = TSFE age|doktype = 4]> lib.menu_2.1.NO { > noLink = 1 > } > [global] > > This has no effect. > > > I would appreciate any help. Your first approach looks generally ok. You can probably accomplish what you want using a CASE cObject [1]. It's like a php switch statement; you set up options for rendering based on some value--in this case the value of the doktype field in the page record). -- Christopher Torgalson http://www.typo3apprentice.com/ [1] http://typo3.org/documentation/docum...1.0/view/8/17/ _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#3
|
|||
|
|||
|
> Your first approach looks generally ok. You can probably accomplish
> what you want using a CASE cObject [1]. It's like a php switch > statement; you set up options for rendering based on some value--in > this case the value of the doktype field in the page record). But the first approach wont work with a GMENU since there is no stdWrap available like in TMENU. There are allWrap+stdWrap and allstdWrap Since it's about creating a link for the whole item I guess allStdWrap will do. HTH Joey -- Wenn man keine Ahnung hat: Einfach mal Fresse halten! (If you have no clues: simply shut your gob sometimes!) Dieter Nuhr, German comedian openBC/Xing: http://www.cybercraft.de T3 cookbook: http://www.typo3experts.com _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#4
|
|||
|
|||
|
Very cool, guys!
the allStdWrap hint worked – regarding the links. However, now my graphical titles are not rendered anymore... I guess I would have to add something to allStdWrap to re-enable the rendering of the bitmaps. But how? Would you be so kind and help me once again? I would really appreciate. cheers, Mark. Here's my code: NO { stdWrap.htmlSpecialChars = -1 allStdWrap.cObject = CASE allStdWrap.cObject { key.field = doktype 4 = TEXT 4 { field = nav_title wrap = <div class="menuL1inactive"> | </div> } default = TEXT default { field = nav_title typolink.parameter.field = uid typolink.extTarget.field = target wrap = <div class="menuL1off"> | </div> } } XY = 145, 20 backColor = #ffffff 10 = TEXT 10.text.field = title 10.text.crop = 25 | ... | 1 10.fontColor = #333333 10.fontFile = fileadmin/fonts/TheSansRegular.ttf 10.fontSize = 12 10.niceText = 1 10.niceText.sharpen = 0 10.niceText.scaleFactor = 5 10.offset = 0, 16 } _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#5
|
|||
|
|||
|
> the allStdWrap hint worked - regarding the links. However, now my
> graphical titles are not rendered anymore... > > I guess I would have to add something to allStdWrap to re-enable the > rendering of the bitmaps. But how? > > Here's my code: > > NO { > stdWrap.htmlSpecialChars = -1 > allStdWrap.cObject = CASE > allStdWrap.cObject { > key.field = doktype > 4 = TEXT > 4 { > field = nav_title > wrap = <div class="menuL1inactive"> | </div> > } > default = TEXT > default { > field = nav_title > typolink.parameter.field = uid > typolink.extTarget.field = target > wrap = <div class="menuL1off"> | </div> Well - allStdWrap will work, but not if you are using a cObject here, since this will replace the original cObject, which is a GIFBUILDER element. It will work, if you use allStdWrap to assign just the typolink and a wrap to the images generated by the GIFBUILDER. Something like this: allStdWrap { typolink { parameter { field = uid if { value = 4 equals.field = doktype negate = 1 # enables typolink only # if doktype != 4 } } } outerWrap.cObject = CASE outerWrap.cObject { key.field = doktype default = TEXT default.value = <div class="menuL1off"> | </div> 4 = TEXT 4.value = <div class="menuL1inactive"> | </div> } } HTH Joey -- Wenn man keine Ahnung hat: Einfach mal Fresse halten! (If you have no clues: simply shut your gob sometimes!) Dieter Nuhr, German comedian openBC/Xing: http://www.cybercraft.de T3 cookbook: http://www.typo3experts.com _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#6
|
|||
|
|||
|
Thank you for your suggestion, but unfortunately I can't get it to work. The outerWrap works like a charm, but the links are still active for the shortcut menu-items.
Please correct me if i am wrong: If I understand correctly, the function first checks if the doktype is 4. Through 'negate', the function returns 'false' and the typolink.parameter.field then equals false and the link should not be rendered. Sorry if this sounds silly, but it helps me learn. So why doesn't this work then? Mark. _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
| Themen-Optionen | Thema durchsuchen |
| Ansicht | Thema bewerten |
|
|
|
||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| [TYPO3] GMENU equivalent of innerwrap | Nikolas Hagelstein | typo3-english@lists.netfielders.de | 3 | 28.02.2007 16:18 |
| [TYPO3] image lang gmenu | Bas van der Togt | typo3-english@lists.netfielders.de | 0 | 21.01.2007 15:07 |
| [TYPO3] Need Urgent help with GMENU | Katja Kositer | typo3-english@lists.netfielders.de | 1 | 05.01.2007 12:45 |
| Re: [TYPO3] How to use Chinese characters in GMENU | Nikolas Hagelstein | typo3-english@lists.netfielders.de | 3 | 12.12.2006 21:02 |
| [TYPO3] How to use Chinese characters in GMENU | Peter Klein | typo3-english@lists.netfielders.de | 1 | 12.12.2006 16:43 |