[TYPO3] CONTENT table = pages does not work
Peter Russ
peter.russ at 4many.net
Tue May 29 15:25:05 CEST 2007
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].
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