TYPO3Jack.net - Das TYPO3 Mailinglist Forum Archiv

TYPO3 Mailingliste: nicht fragen - lesen!

TYPO3 Mailingliste: nicht fragen - lesen!_RR_1-->
Zurück   TYPO3Jack.net - Das TYPO3 Mailinglist Forum Archiv > TYPO3-Mailinglists: ENGLISH > typo3-english@lists.netfielders.de

Registrieren Hilfe Benutzerliste Kalender Suchen Heutige Beiträge Alle Foren als gelesen markieren
  #1  
Alt 07.10.2007, 13:32
Peter
Gast
 
Beiträge: n/a
Standard [TYPO3] Challenge: render IAProcFunc menus differently based onreturned record content

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
 

Lesezeichen

Themen-Optionen
Ansicht Thema bewerten
Thema bewerten:

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an


Ähnliche Themen

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


Alle Zeitangaben in WEZ +1. Es ist jetzt 07:32 Uhr.


Powered by vBulletin® Version 3.7.4 (Deutsch)
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Template-Modifikationen durch TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75