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
Php 如何在typolinkwrap中向url添加参数?_Php_Typo3_Typoscript - Fatal编程技术网

Php 如何在typolinkwrap中向url添加参数?

Php 如何在typolinkwrap中向url添加参数?,php,typo3,typoscript,Php,Typo3,Typoscript,我使用以下代码在标记中显示链接: $this->wrappedSubpartArray['###mMY_TEMPLATEMARKER###']=$this->cObj->typolinkWrap( array('parameter' => ($this->conf['single.']['pid'] > 0 ? $this->conf['single.']['pid'] : $GLOBALS['TSFE']->id), 'additiona

我使用以下代码在标记中显示链接:

    $this->wrappedSubpartArray['###mMY_TEMPLATEMARKER###']=$this->cObj->typolinkWrap( array('parameter' => ($this->conf['single.']['pid'] > 0 ? $this->conf['single.']['pid'] : $GLOBALS['TSFE']->id), 'additionalParams' => '&' . $this->prefixId . '[show]=' . $rowArray[($this->piVars['pointer'] > 0 ? $this->piVars['pointer'] : 0)][$i]['uid'], 'useCacheHash' => 1) ); // Shows Detail Link
我想添加参数

'&type=250' 

最后,但它不会出现,或者&不见了

多么难看的符号!!!:S

Typlink使用额外的参数就像string
¶m1=val1¶m2=val
一样,所以只需将您想要的内容粘贴到其中即可(注意,它总是使用
&
字符作为参数,即使是第一个参数):

$arr=array(
'参数'=>($this->conf['single.]['pid']>0?$this->conf['single.]['pid']:$GLOBALS['TSFE']->id),
'additionalParams'=>'&'$this->prefixId'.[show]='.$rowArray[($this->piVars['pointer']>0?$this->piVars['pointer']:0)][$i]['uid'.&type=250',//1);
$this->wrappedSubpartArray['#########mMY#u TEMPLATEMARKER']
=$this->cObj->typolinkWrap($arr);

谢谢,是的,我也觉得很简单。但是,一旦添加了参数ist'&type=250',它就不会显示在url中:“type=250'->works;”&类型=250'->不起作用;'"type=250'->起作用(这很奇怪,因为前面的参数不起作用)
$arr = array(
    'parameter' => ($this->conf['single.']['pid'] > 0 ? $this->conf['single.']['pid'] : $GLOBALS['TSFE']->id),
    'additionalParams' => '&' . $this->prefixId . '[show]=' . $rowArray[($this->piVars['pointer'] > 0 ? $this->piVars['pointer'] : 0)][$i]['uid'] . '&type=250', // <- here
    'useCacheHash' => 1);

$this->wrappedSubpartArray['###mMY_TEMPLATEMARKER###'] 
                          = $this->cObj->typolinkWrap($arr);