[TYPO3] ow can i know number pages on a given level in page tree?
Peter Klein
peter at umloud.dk
Wed Mar 28 09:21:46 CEST 2007
Hi Andrew.
You can use the "numRows" property to get a number returned. You can use it
on all tables, but here's an example that uses the pages table..
-- cut --
lib.numberOfSubpages = COA
lib.numberOfSubpages {
10 = TEXT
10.numRows {
table = pages
select.pidInList.data = pages:uid
}
10.wrap = <div>Number of Subpages to this page: |</div>
}
page.555 < lib.numberOfSubpages
-- cut --
The above example returns the number of subpages of the current page, so if
you need it from a specific page, just change the line:
select.pidInList.data = pages:uid
--
Peter Klein/Umloud Untd
"Andrew Davis" <andrew at theandrewunderground.com> skrev i en meddelelse
news:mailman.1.1175057327.10814.typo3-english at lists.netfielders.de...
> Is there any TS that can reference / return the number of pages on a given
> level of a page tree?
>
> Ex. if the root had 4 pages (home,contact,about,portfolio), i could ask
> "how many pages in level=1", it would return "4"
>
> I am trying to make a simple hmenu/gmenu that will adjust the width of the
> nav .gif images according to the number of pages in the nav, so that
> adding a page wont wrap the menu around to the next line...
>
> Any help much appreciated, thanks
>
> andrew davis
More information about the TYPO3-english
mailing list