[TYPO3] CONTENT table = pages does not work

Markus Kolb usenet-032007 at tower-net.de
Tue May 29 23:58:45 CEST 2007


Peter Russ wrote on 29.05.2007 15:25:
> Markus Kolb schrieb:
>> Hello,
>>
>> I want to get title and alias fields out of pages table.
>> The wrap is empty so something I have to do wrong.
>>
>> I need the alias field in my menus. I've got a look at the T3 sources
>> and I've seen that there is no field:alias available in draft mode.
>> Why...? I don't really understand...
>> I need the alias in draft and live mode for consistency and so I want to
>> get the alias-field from the database with CONTENT.
>>
>> I doesn't get anything back from renderObj so what do I do wrong?
>>
>> This is the related part of the TS:
>>
>> temp.menu.1 = TMENU
>> temp.menu.1 {
>>   NO {
>>     before.cObject = COA
>>     before.cObject {
>>       5 = TEXT
>>       5.value = <img src=
>>       10 = CONTENT
>>       10 {
>>         table = pages
>>         select {
>>           selectFields = title,alias
>>           uidInList.field=uid
>>           max = 1
>>           where = hidden=0
>>         }
>>         renderObj = COA
>>         renderObj {
>>           10 = TEXT
>>           10.field = alias
>>           10.wrap = "fileadmin/templates/images/|.gif"
>>         }
>>         wrap = |
>>       }
>>       13 = TEXT
>>       13 {
>>         field = title
>>         noTrimWrap = | border="0" alt="image: |"|
>>       }
>>       15 = TEXT
>>       15 {
>>         field = title
>>         noTrimWrap = | title="image: |" |
>>       }
>>       20 = TEXT
>>       20 {
>>         field = alias // nav_title // title
>>         case = lower
>>         wrap = name="|" />
>>       }
>>     }
>>     allWrap = <li>|</li>
>>   }
>> }
> 
> You should try to use register as due to your TS the object [10] is
> closed before you access it at [20].

???
This is a COA and the problem is not the 20 TEXT object. I could remove
20 at all.
The problem is that the

10.field = alias // title
10.wrap = "fileadmin/templates/images/|.gif"

always wraps to NULL.

So something must be wrong with my CONTENT MySQL SELECT.

Markus


More information about the TYPO3-english mailing list