Die TYPO3 Mailingliste - nicht fragen: lesen!
This is a discussion on [TYPO3] If main menu doesn't have a submenu ... ? within the typo3-english@lists.netfielders.de forums, part of the TYPO3-Mailinglists: ENGLISH category; How do I check if the current page doesn't have any submenu pages under it? I have created two ...
|
|||||||
| Registrieren | Hilfe | Benutzerliste | Kalender | Suchen | Heutige Beiträge | Alle Foren als gelesen markieren |
|
#1
|
|||
|
|||
|
How do I check if the current page doesn't have any submenu pages under it?
I have created two menus, one main menu on top and a side menu on the left side of the content. Problem is when the user clicks on a menu on top and it doesn't have any submenus on it the menu at the left side will be empty. I would like it to default to get the items above it if current level is empty ... Here's what I have so far.. I know I'm probably doing this wrong... I'm actually a bit confused right now on how to use negate and 'if' .... : lib.submenu = COA lib.submenu { wrap = <div class="submenucontainer">|</div> #should be standard menu for all pages 20 = HMENU 20.entryLevel = -1 20.1 = TMENU 20.1 { wrap = <div class="submenu"><ul>|</ul></div> NO.allWrap = <li>|</li> ACT < .NO ACT = 1 ACT.allWrap = <li class="submenuact">|</li> } 20.if.isTrue = 1 #this should appear only when the current page is empty, then replace the one above. 30 = HMENU 30.entryLevel = -2 30.1 = TMENU 30.1 { wrap = <div class="submenu"><ul>|</ul></div> NO.allWrap = <li>|</li> ACT < .NO ACT = 1 ACT.allWrap = <li class="submenuact">|</li> } 30.if.isTrue = 0 30.if.negate = 1 } submenu.20 and submenu.30 is both revealed and that is something I don't want to happen I just wanted submenu.30 to appear(replacesubmenu.20) only when the current page does not have any pages under it.. Can anyone help ? Elijah _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#2
|
|||
|
|||
|
Elijah Alcantara kirjoitti:
> How do I check if the current page doesn't have any submenu pages under it? > > I have created two menus, one main menu on top and a side menu on the > left side of the content. Problem is when the user clicks on a menu on > top and it doesn't have any submenus on it the menu at the left side > will be empty. I would like it to default to get the items above it if > current level is empty ... read TSRef and menu states - there is for example CURIFSUB _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#3
|
|||
|
|||
|
hi, hi
How can I get a static version of my website I made in typo3? I 'd like to know an easy way to do it thanks a lot laura _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#4
|
|||
|
|||
|
>> How do I check if the current page doesn't have any submenu pages
>> under it? >> >> I have created two menus, one main menu on top and a side menu on the >> left side of the content. Problem is when the user clicks on a menu >> on >> top and it doesn't have any submenus on it the menu at the left side >> will be empty. I would like it to default to get the items above it >> if current level is empty ... > > read TSRef and menu states - there is for example CURIFSUB Which is of no help in this case, since it won't give you the siblings of the current page, if there are no subpages. 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 |
|
#5
|
|||
|
|||
|
> How do I check if the current page doesn't have any submenu pages
> under it? > > I have created two menus, one main menu on top and a side menu on the > left side of the content. Problem is when the user clicks on a menu on > top and it doesn't have any submenus on it the menu at the left side > will be empty. I would like it to default to get the items above it if > current level is empty ... > > Here's what I have so far.. I know I'm probably doing this wrong... > I'm actually a bit confused right now on how to use negate and 'if' > ... : Well - this is not the scenario for the use of "if" but for "override". The override property will only override the current content, if there is some content in the overriding object. So you could do it like this: temp.siblingMenu = HMENU temp.siblingMenu { entryLevel = -2 1 = TMENU 1 { wrap = <ul>|</ul> NO { allWrap = <li>|</li> } } } temp.subpageMenu < temp.siblingMenu temp.subpageMenu { entryLevel = -1 } temp.mySwitchingMenu = COA temp.mySwitchingMenu { 10 < temp.siblingMenu stdWrap.override.cObject < temp.subpageMenu } This will generate a menu with the siblings of the current page in section 10 of the COA. Then it will override the whole COA with a menu of the subpages of the current page but only if there is content in the subpageMenu. Just be sure to only wrap the TMENU and TMENUITEM parts but not the HMENU since this would always return at least the wrap as a content. 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
|
|||
|
|||
|
Please, do not hijack threads!
http://typo3.org/community/mailing-l...es-guidelines/ > How can I get a static version of my website I made in typo3? wget –np -E –k –p -L -r -l0 -P/[download_folder] -erobots=off "http://www.[your_domain].com/" I cannot tell if you are gonna call it easy, though. Tomas Mrozek _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#7
|
|||
|
|||
|
Hi,
That works perfectly and that's exactly what I needed, many thanks! =) Elijah > Well - this is not the scenario for the use of "if" but for "override". > The override property will only override the current content, if there is > some content in the overriding object. So you could do it like this: > > temp.siblingMenu = HMENU > temp.siblingMenu { > entryLevel = -2 > 1 = TMENU > 1 { > wrap = <ul>|</ul> > NO { > allWrap = <li>|</li> > } > } > } > > temp.subpageMenu < temp.siblingMenu > temp.subpageMenu { > entryLevel = -1 > } > > temp.mySwitchingMenu = COA > temp.mySwitchingMenu { > 10 < temp.siblingMenu > stdWrap.override.cObject < temp.subpageMenu > } > > This will generate a menu with the siblings of the current page in section > 10 of the COA. > Then it will override the whole COA with a menu of the subpages of the > current page but only if there is content in the subpageMenu. > Just be sure to only wrap the TMENU and TMENUITEM parts but not the HMENU > since this would always return at least the wrap as a content. > > 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 > -- Elijah O. Alcantara http://elijah.pinoguin.com Web/Typo3 Developer, Sys/Net Administrator & Support PHP Development ApS http://phpdev.dk _______________________________________________ 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] TemplaVoila Main Template | Kuldev Singh | typo3-english@lists.netfielders.de | 2 | 02.05.2007 16:20 |
| [TYPO3] hide empty submenu (via css) | Felix Natter | typo3-english@lists.netfielders.de | 2 | 19.03.2007 17:19 |
| [TYPO3] Having ressources in main TS template | Mike Morris | typo3-english@lists.netfielders.de | 3 | 10.03.2007 04:53 |
| [TYPO3] new site - BE empty main frame | Katja Lampela | typo3-english@lists.netfielders.de | 2 | 04.01.2007 11:10 |
| [TYPO3-templavoila] Activated main menu's text in sub menu list | Siller Ákos | typo3-project-templavoila@lists.netfielders.de | 1 | 04.12.2006 08:57 |