Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Typo3 getTypoLink\u URL不工作_Typo3 - Fatal编程技术网

Typo3 getTypoLink\u URL不工作

Typo3 getTypoLink\u URL不工作,typo3,Typo3,我正在做一个现有的项目。我正在用轮胎 $params = array( $this->prefixId.'[cmd]' => 'SINGLE', $this->prefixId.'[uid]' => intval( $item['uid'] ), $this->prefixId.'[chash]' =

我正在做一个现有的项目。我正在用轮胎

$params = array(
                            $this->prefixId.'[cmd]' => 'SINGLE',
                            $this->prefixId.'[uid]' => intval( $item['uid'] ),
                            $this->prefixId.'[chash]' => substr( md5( $item['uid'] ), 0, 8 ),
                            $this->prefixId.'[page]' => $this->GPvars['page'],
                        );
$link = '<a href="'.str_replace( '&', '&amp;', $this->pi_getPageLink( $this->conf['pidSingle'], '_self', $params ) ).'" target="_self" title="'.$submarks['###SINGLE###'].'">';

函数需要参数。您应该会收到错误消息。读这本书

但我通常使用typolink函数。您可以为typolink使用任何打字脚本选项:

$this->cObj->stdWrap_typolink(
   '',  
   array(
      'returnLast' => 'url',
      'parameter' => 123,
      'additionalParams' => '&test=1&bar=yes',
   )
);

此解决方案无法工作:

$this->cObj->stdWrap_typolink(
   '',  
   array(
      'returnLast' => 'url',
      'parameter' => 123,
      'additionalParams' => '&test=1&bar=yes',
   )
);
这一个有效:

$this->cObj->stdWrap_typolink(
   '',  
   array('typolink' => array(
      'returnLast' => 'url',
      'parameter' => 123,
      'additionalParams' => '&test=1&bar=yes',
   )
);

我已经在传递参数,但它仍然返回空字符串。此外,我尝试使用$this->cObj->stdWrap\u typolink,但它也返回空字符串。只需编辑您的问题并粘贴您使用的代码即可。检查您使用的PID是否正确,页面是否可见。如果存在有效值,请检查$this->conf['pidSingle']。使用现有的页面ID检查它!您的类是否扩展了tslib_pibase?
$this->cObj->stdWrap_typolink(
   '',  
   array(
      'returnLast' => 'url',
      'parameter' => 123,
      'additionalParams' => '&test=1&bar=yes',
   )
);
$this->cObj->stdWrap_typolink(
   '',  
   array('typolink' => array(
      'returnLast' => 'url',
      'parameter' => 123,
      'additionalParams' => '&test=1&bar=yes',
   )
);