[TYPO3] How to loop in TS?
Mattias Borell
Mattias.Borell at med.lu.se
Tue Apr 8 11:21:29 CEST 2008
Hi again!
Dmitry Dulepov [typo3] wrote:
> Hi!
>
> Mattias Borell wrote:
>> I can't seem to find a way to make a {DB:X:Y} that just gives the active
>> uid, and using a combination of standard wrap (|) and the {DB:X:Y}
>> doesn't seem to work either. What am I missing here? Do I need to make
>> this in separate steps, use another approach or...?
>
> Use CONTENT instead. There select necessary pages and use TEXT and renderObj.In TEXT use its "field" property and set it to "title".
Ok, read up a bit (TSref) on CONTENT and SELECT, and came up with this code:
temp.quickMenu-content = CONTENT
temp.quickMenu-content {
table = pages
select {
selectFields = uid,title
pidInList = 90,89,87
}
renderObj = COA
renderObj {
10 = TEXT
10 {
field = uid
wrap = <option value="index.php?id=|">
}
20 = TEXT
20 {
field = title
wrap = |</option>
}
}
}
No content created at all... :->
I can easily get the data when working directly with the database, so
I'm betting on the select-part above being correct, but I could be wrong
as my mind doesn't seem to work the same way as TypoScript does, at
least not today. Any further hints? Should I use the field properties
differently? What have I missed or misunderstood?
Side issue: what tool/method inside of typo3 could I use to check the
results of a select like the one above? Right now I'm adding the content
to a page, emptying the cache and checking the page for changes, and I'm
guessing that there might be a better way - there usually is in Typo3,
but it sure can be hard to find! :->
Regards,
/Mattias
--
Mattias Borell
Sysadmin // Developer
LUDC - Lund University Diabetes Centre
CRC, Entrance 72, House 60, floor 13
SE 205 02, Malmö, SWEDEN
Tel: +46 40 39 12 27
More information about the TYPO3-english
mailing list