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模板中获取baseURL_Typo3_Typoscript_Typo3 6.2.x - Fatal编程技术网

如何在Typo3模板中获取baseURL

如何在Typo3模板中获取baseURL,typo3,typoscript,typo3-6.2.x,Typo3,Typoscript,Typo3 6.2.x,我使用打字脚本定义了baseURL,代码如下: page.config.baseURL = http://www.website.nl/ 现在我想使用html模板中的baseURL来引用图像。如何将此url添加到模板?尝试了以下操作,但不起作用 <img src="{baseURL}images/sicma.png" width="70" height="28" alt="sicma"> 首先将其放入常数: baseURL = http://www.website.nl/ 然后

我使用打字脚本定义了baseURL,代码如下:

page.config.baseURL = http://www.website.nl/
现在我想使用html模板中的baseURL来引用图像。如何将此url添加到模板?尝试了以下操作,但不起作用

<img src="{baseURL}images/sicma.png" width="70" height="28" alt="sicma">

首先将其放入常数:

baseURL = http://www.website.nl/
然后在设置中使用它

page.config.baseURL = {$baseURL}

temp.logo = TEXT
temp.logo.value = <img src="{$baseURL}images/sicma.png" width="70" height="28" alt="sicma">
page.config.baseURL={$baseURL}
临时徽标=文本
临时徽标值=
当然,您必须为模板指定temp.logo


但是baseURL不是正好在那里,所以您不必写入绝对路径吗?

首先将其放入常量:

baseURL = http://www.website.nl/
然后在设置中使用它

page.config.baseURL = {$baseURL}

temp.logo = TEXT
temp.logo.value = <img src="{$baseURL}images/sicma.png" width="70" height="28" alt="sicma">
page.config.baseURL={$baseURL}
临时徽标=文本
临时徽标值=
当然,您必须为模板指定temp.logo


但是baseURL不是正好在那里,所以您不必写入绝对路径吗?

首先将其放入常量:

baseURL = http://www.website.nl/
然后在设置中使用它

page.config.baseURL = {$baseURL}

temp.logo = TEXT
temp.logo.value = <img src="{$baseURL}images/sicma.png" width="70" height="28" alt="sicma">
page.config.baseURL={$baseURL}
临时徽标=文本
临时徽标值=
当然,您必须为模板指定temp.logo


但是baseURL不是正好在那里,所以您不必写入绝对路径吗?

首先将其放入常量:

baseURL = http://www.website.nl/
然后在设置中使用它

page.config.baseURL = {$baseURL}

temp.logo = TEXT
temp.logo.value = <img src="{$baseURL}images/sicma.png" width="70" height="28" alt="sicma">
page.config.baseURL={$baseURL}
临时徽标=文本
临时徽标值=
当然,您必须为模板指定temp.logo


但是baseURL不是正好在那里,所以您不必编写绝对路径吗?

这似乎已经是解决方案了。或者,您可以尝试使用base在本地对其进行寻址

<f:base />

资料来源:


这似乎已经是解决方案了。或者,您可以尝试使用base在本地对其进行寻址

<f:base />

资料来源:


这似乎已经是解决方案了。或者,您可以尝试使用base在本地对其进行寻址

<f:base />

资料来源:


这似乎已经是解决方案了。或者,您可以尝试使用base在本地对其进行寻址

<f:base />

资料来源:


你说得对。使用baseurl功能和绝对路径是多余的。你是对的。使用baseurl功能和绝对路径是多余的。你是对的。使用baseurl功能和绝对路径是多余的。你是对的。使用baseurl功能和绝对路径是多余的。