使用 TypoScript 获取网站名称? [英] Get website name using TypoScript?
问题描述
有没有办法使用 TypoScript 获取网站名称?
Is there a way to get the website name using TypoScript?
在我使用的 TypoScript 模板中
In my TypoScript template I am using
data = page : name
获取我所在的当前页面的名称,例如关于
.
to get the name of the current page I am on e.g. About
.
我也需要获取网站名称,所以我试过了
I need to get the webiste name as well, so I have tried
data = site : name
但这不正确,我在文档中找不到网站名称的正确数据名称.
but this is not correct and I can't find the correct data name for the website name in the documentation.
注意:网站名称是指在模板设置中输入的 Sitename
.
NOTE: by website name I mean the Sitename
entered in the template settings.
推荐答案
使用下面的行,您需要知道表 sys_template 中 TypoScript 模板条目的使用 uid,其中 uid=1 在下面的示例中:
With line below you need to know used uid of the TypoScript template entry from table sys_template, where uid=1 in example below:
data = DB:sys_template:1:title
或者您可能希望使用为您的安装设置的站点名称:
Or maybe you want use the sitename as set for your installation:
data = GLOBAL:TYPO3_CONF_VARS|SYS|sitename
这篇关于使用 TypoScript 获取网站名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!