|
|||||||
| Registrieren | Hilfe | Benutzerliste | Kalender | Suchen | Heutige Beiträge | Alle Foren als gelesen markieren |
|
#1
|
|||
|
|||
|
Ok, here's the simple bit:
lib.myMenu = HMENU lib.myMenu { 1 = GMENU 1 { itemArrayProcFunc = tx_myext_myplugin->getMenuRecords NO = 1 NO { ATagTitle.field = title allWrap = <span class="navItem"> | </span> backColor = #999999 XY = 100,20 10 = TEXT 10 { text.field = title fontColor = #ffffff } } } } This works perfectly, produces the result you would expect, a menu based on the array returned by getMenuRecords. The challenge: The array returned by getMenuRecords contains rows from a plugin table rather than page records. In addition to the useful and required 'title', 'uid' etc, one of the fields returned in each record in the array is labeled 'myfield'. What I need is for NO to be different based on the field 'myfield': NO { ATagTitle.field = title allWrap = <span class="navItem"> | </span> backColor = #eeeeee XY = 200,40 10 = TEXT 10 { text.field = title fontColor = #333333 } } [] can't be used inside lib.myMenu.1, and is useless outside as 'myfield' is out of scope. NO = CASE can't be used or I can't determine a way to use it for this purpose - the contained parameters are always ignored resulting in a blank white image of default size Despite much wrangling I can't see how I can work an IF statement into the GMENU so that the entire NO entry is different based on the content of the 'myfield' field. I could, potentially, get away with making the differences exist only inside lib.myMenu.1.NO.10 but still can't see how I can use CASE or IF to do this. Any ideas anyone? Peter. _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
| Lesezeichen |
| Themen-Optionen | |
| Ansicht | Thema bewerten |
|
|
|
||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| [TYPO3] Menu challenge | Øyvind Frøland - UniWeb AS | typo3-english@lists.netfielders.de | 3 | 24.09.2007 12:31 |
| [TYPO3-dev] Make Extension-$content output by tt_content record andUID | Markus Giesen | typo3-dev@lists.netfielders.de | 3 | 16.05.2007 07:26 |
| [TYPO3-templavoila] Render content of page from PHP | Mark Ravitz | typo3-project-templavoila@lists.netfielders.de | 1 | 10.05.2007 10:22 |
| [TYPO3-templavoila] Content Elements don't render | Helge Preuss | typo3-project-templavoila@lists.netfielders.de | 1 | 02.03.2007 14:22 |
| [TYPO3] Header layout based on content area | Lasse Guldsborg | typo3-english@lists.netfielders.de | 4 | 12.02.2007 15:20 |