[英]Use a variable in Typoscript “select”
I try to get an author of a Typo3 site and after this i try to fill a Typo3 select (typoscript) with the resulting ID. 我尝试找一个Typo3网站的作者,然后我尝试用生成的ID填充Typo3 select(打字稿)。 Its somehow working, but i can not use the lib oder variable as datasource of another select
它以某种方式工作,但我不能使用lib oder变量作为另一个选择的数据源
I tryed to play arround with LOAD_REGISTER or marker. 我试图与LOAD_REGISTER或标记一起玩。 But i think it has to be a way to use a select result or another "lib" result in a select.
但是我认为这必须是在选择中使用选择结果或另一个“ lib”结果的方法。
Here is my code: 这是我的代码:
// Returns succsessfully "neuz8" and i can use this in fluid
lib.author = TEXT
lib.author.data = page:author
lib.Authornavigation = CONTENT
lib.Authornavigation {
stdWrap.required = 1
table = be_users
select {
uidInList = 0
pidInList = root
selectFields = be_users.uid as id, be_users.realName as rn, be_users.profile_pid as prid
where = be_users.profile_pid != '0'
andWhere = be_users.realName={lib.author} // Is not working, why?
// I tryed: combinations of andWhere.data or lib.author.data,
// with and without {},
// with LOAD_REGISTER,
// with "markers",
//andWhere = be_users.realName='neuz8' < this works and returns "39", the correct ID
andWhere.wrap =
markers {
//author.data = {page:author}
}
}
renderObj = COA
renderObj {
10 = TEXT
10.field = prid
10.wrap2 = ###SPLITTER### |
}
stdWrap.split {
token = ###SPLITTER###
cObjNum = 1 |*| 2 |*| 1
1.current = 1
2.current = 1
2.wrap = |,
}
}
This should work 这应该工作
replace 更换
// andWhere = be_users.realName={lib.author} // Is not working, why?
with 与
andWhere = be_users.realName=
andWhere.postCObject < temp.author
You can try select.markers: 您可以尝试select.markers:
page.60 = CONTENT
page.60 {
table = tt_content
select {
pidInList = 73
where = header != ###whatever###
orderBy = ###sortfield###
markers {
whatever.data = GP:first
sortfield.value = sor
sortfield.wrap = |ting
}
}
}
Docs » Functions » select (see part markers) 文件»功能»选择 (请参阅零件标记)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.