[TYPO3] how to get Page Number using TS?
David Lanier
mailinglists at davidlanier.com
Mon Jan 22 23:57:43 CET 2007
I am trying pm_pagenumber now. If I can get it to work, I think it will
be exactly what I am looking for.
I have tried it both as a plugin and using typoscript in templavoila (as
described in its included README.txt file), and I have not been able to
get it to work yet.
I have inserted it as a plugin on a plain TV page. When I give it a
header, that header shows up fine. But regardless of what I put in the
plugin options, the page number doesn't show up. I've tried it with and
without a startingpoint.
When I try the typoscript route, I don't get any output either.
In my main template I have the following
Include static (from extensions):
Page Numbering (pm_pagenumber)
CSS Styled Content (css_styled_content)
The setup field includes this:
lib.pageNumber < plugin.tx_pmpagenumber_pi1
My basic setup:
TYPO3 4.0
PHP5
MySQL 5
Is there anything additional I should add to get the page number to appear?
Some additional information, for the typoscript route:
Data Structure:
<field_content type="array">
<tx_templavoila type="array">
...
<eType>TypoScriptObject</eType>
<eType_EXTRA type="array">
<objPath>lib.pageNumber</objPath>
</eType_EXTRA>
<TypoScriptObjPath>lib.pageNumber</TypoScriptObjPath>
</tx_templavoila>
</field_content>
putting this:
lib.pageNumber = TEXT
lib.pageNumber.value = 11
into the setup field does output the number 11 as expected.
Katja Lampela wrote:
> Did you already check pm_pagenumber
> Katja
>
> David Lanier wrote:
>
>> Does anyone have an idea of how to get the current page number, using
>> typoscript?
>>
>> My scenario is like this:
>>
>> Page tree:
>> - page 1
>> - page 2
>> -- subpage 1
>> -- subpage 2
>> -- subpage 3
>> -- subpage 4 (current page)
>> -- subpage 5
>> - page 3
>> - page 4
>> - page 5
>>
>> I would like to use some typoscript similar to the following, but I have
>> not been able to locate it.
>> lib.pagenum = TEXT
>> lib.pagenum.value = {currentpage.pagenum}
>> // expecting the number "4"
>>
>> HMENU.special.browse gets close, but I don't think it provides the
>> number of the current page. I'm not looking for the PID of the current
>> page, only what number it is within its section. (I want to use this in
>> a javascript in the page header.)
>>
>> Any tips would be most appreciated.
>> David Lanier
>>
More information about the TYPO3-english
mailing list