[TYPO3] CONTENT table = pages does not work

Peter Russ peter.russ at 4many.net
Wed May 30 08:34:31 CEST 2007


Markus Kolb schrieb:
> 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

Check TSref for the select element. uidInList has no stdWrap properties. 
I've no idea what you are trying, but IMHO you try the 2nd best solution.

Regs. Peter.

-- 
Fiat lux!
Docendo discimus.
_____________________________
4Many® Services
openBC: http://www.openbc.com/go/invuid/Peter_Russ


More information about the TYPO3-english mailing list