[TYPO3] if + numrows trouble

Max Novikov webmaster at lisa.org
Mon Nov 26 12:16:16 CET 2007


Hello,

      I have dynamically generated table of contents. Now I want it to
be skipped if there's only one item on the page. I wrote the following
code in the template setup, but it doesn't work and doesn't produce
any kind of error messages. What am I doing wrong here?

...
temp.contentnav = CONTENT
temp.contentnav {
  table = tt_content
  select {
    pidInList = this
    orderBy = sorting
    where = colPos=0
    languageField=sys_language_uid
    }
  renderObj = TEXT
  renderObj {
    field = header 
    wrap=<li>|</li>
    typolink.parameter.field=pid
    typolink.parameter.dataWrap=|#{field:uid}
    if.isTrue.field=header
    }
  wrap = <div id="content-nav"><div><h3>Table of contents</h3><ul>|</ul></div></div>
# Everything works fine but this part :(
  if {
    value = 1
    isGreaterThan.numRows {
      table = tt_content
      select {
        pidInList = this
        where = colPos=0
        }
      }
    }
# End of bad part.
  }
...
main.10.marks.CONTENTNAV < temp.contentnav

-- 
Best regards,
 Max                          mailto:webmaster at lisa.org



More information about the TYPO3-english mailing list