[TYPO3] how to get Page Number using TS?
JoH asenau
info at cybercraft.de
Wed Jan 24 01:58:07 CET 2007
> I did get this to work as a TMENU, like you have it here. But I could
> not get {register:count_HMENU_MENUOBJ} to show to be replaced properly
> in a GMENU.
>
> NO.allWrap = <li someAttrib="{register:count_HMENU_MENUOBJ}">|</li>
> NO.allWrap.insertData = 1
>
> This method almost works. The problem is that it inserts the TOTAL
> number of pages, instead of the current page number.
The problem is, that you only got two registers
count_menuItem for the current position of an entry in the whole menu and
count_HMENU_MENUOBJ for the total number of entries in a part of the menu.
There is no register for the current position of an entry in a submenu.
So you might get something like this:
1
2
3
4
5
6
7
8
9
10
11
or that
3
3
3
3
3
2
2
2
2
1
3
but not
1
1
2
3
2
1
1
2
2
1
3
So the last version can only be achieved using your own registers and
prioriCalc.
It's a definite "no-no" to put a CONTENT element like described in my last
post before each menu entry, since this would be a MySQL query overkill.
Maybe you should give IProcFunc a try and use some PHP to get the counter
you need.
HTH
Joey
--
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
openBC/Xing: http://www.cybercraft.de
T3 cookbook: http://www.typo3experts.com
More information about the TYPO3-english
mailing list