[TYPO3] typolink in php

christian oettinger christian.oettinger at gmx.de
Thu Jul 6 15:00:50 CEST 2006


Many thanks, Sebastian!!
This helps.

> Hi Christian,
> 
> i am guessing that you are calling just a function in your language 
> selection file (something like "function user_languageMenu($content) 
> {...}") and not a class function.
> in this case you could use the cObj of the global TSFE:
> $GLOBALS['TSFE']->cObj->typolink(...)
> 
> the other way would be to have a class extending tslib_pibase, than you 
> could use something like:  $this->pi_getPageLink(...) which will call 
> the typolink function.
> 
> there was an article about links in the frontend propably that will help:
> http://typo3.org/development/articles/using-links-in-frontend-plugins/
> 
> all the best,
> sebastian
> 
> 
> 
> christian oettinger wrote:
> 
>> Hi all,
>>
>> maybe this is a stupid question, but how do I create a typolink in a 
>> php file (in my case a language selection file)?
>>
>> I tried "$this->cObj->typolink.." which I thought to be available but 
>> got the following error:
>> Fatal error: Call to a member function on a non-object in 
>> /home/www/html-data/typo3/uploads/sprachen.php on line 79
>>
>>
>> Thanks for any hint.
>>
>> oe (christian)



More information about the TYPO3-english mailing list