[TYPO3-dev] Getting id of the page

Martin Ficzel martin.ficzel at gmx.de
Fri Aug 25 12:00:56 CEST 2006


Tapio Markula schrieb:
> Martin Ficzel kirjoitti:
>> Tapio Markula schrieb:
>>> Hi
>>>
>>> I would need for function 'docStyle()' for class.ux_template.php
>>>
>>> the id of the page, which has been opened.
>>> I tried to get it from $_GET parameter
>>
>> did you have a look at the $GLOBALS['TSFE'] object;
>>
>> t3lib_div::debug($GLOBALS['TSFE']);
>>
>> as far as i remember $GLOBALS['TSFE']->id is what you need.
> 
> doesn't existin required context
> 
> 
>     function docStyle()    {
>         global $skin_grey_2Conf,$BE_USER;
>        
>         print $GLOBALS['TSFE']->id;
> no printing result

if you are in the FE t3lib_div::debug($GLOBALS['TSFE']) should show you
the structure of the TSFE Object.

t3lib_div::debug($GLOBALS['TSFE']->id ) is the current page id

the TSFE should always be present in the FE unless you are using eID.

additionally you should always use t3lib_div::debug() instead of print.

regards Martin




More information about the TYPO3-dev mailing list