[Typo3-dev] Some questions concerning extension programming
Bernhard Kraft
kraftb at kraftb.at
Tue Nov 29 12:28:26 CET 2005
Andreas Bulling wrote:
> $conf = array(
> 'useCacheHash' => $this->pi_USER_INT_obj ? 0 : $this->allowCaching,
> 'no_cache' => $this->pi_USER_INT_obj ? 0 : $this->allowCaching,
> 'parameter' => $pageID,
> 'section' => 'cat_' . $categoryUID,
> );
> $link = $this->local_cObj->typoLink( $category, $conf );
"section" is the way to go.
If you are writing a FE-Plugin try:
$link = $this->cObj->typoLink( $category, $conf );
If you want to call the typoLink method from a "subclass" of you extension
just pass the $this pointer to an ->init() method of the subclass:
$subobj->init($this);
function init(&$parentObj) {
$this->pObj = &$parentObj;
}
in you subclass then create the link with:
$this->pObj->cObj->typoLink(...);
if you REALLY need to instanciate your own cObj you will have to set some variables
in it so it works correctly (AFAIK is valid for everthing :)
If everything fails have a look if $pageID is really set. If 'parameter' is set at least
a link to the correct page should get generated.
greets,
Bernhard
More information about the TYPO3-dev
mailing list