开始值和最大值可配置(TypoScript - 内容)
我正在 TS 中做一种分页器...... 我正在做一个选择,但我需要配置(从 GP:var)开始(设置“开始”页面)值...但我找不到办法做到这一点...
我一直在寻找对于它在谷歌,每个人都说它是一个 int+calc 对象...但是如果我不能在 calc 中设置变量,我不明白作为 int+calc 的想法...
我给你一个我的代码的例子
10.select {
pidInList.insertData = 1
pidInList = this
max = 5
begin = 0 #Here is where I would like to configure the begin dynamicaly with stdWrap or something like that
orderBy = pages_smc_news.date DESC
leftjoin = pages_smc_news ON(pages_smc_news.pid = pages.uid) LEFT JOIN tt_content ON (tt_content.pid = pages.uid)
selectFields = pages_smc_news.date, title, bodytext, header,tt_content.pid
where = header="teaser"
andWhere = tt_content.sys_language_uid = 0
}
10.renderObj = COA
10.renderObj {
...
}
...
I'm doing a kind of paginator in TS...
I'm doing a select, but I need to confugre (from a GP:var) the begin (to set the "begin" page) value... But I dont find a way to do that...
I have been looking for it in Google, and everybody says it is a int+calc object... But I dont understand the idea of being a int+calc if I cant set a variable in the calc...
I let you an example of my code
10.select {
pidInList.insertData = 1
pidInList = this
max = 5
begin = 0 #Here is where I would like to configure the begin dynamicaly with stdWrap or something like that
orderBy = pages_smc_news.date DESC
leftjoin = pages_smc_news ON(pages_smc_news.pid = pages.uid) LEFT JOIN tt_content ON (tt_content.pid = pages.uid)
selectFields = pages_smc_news.date, title, bodytext, header,tt_content.pid
where = header="teaser"
andWhere = tt_content.sys_language_uid = 0
}
10.renderObj = COA
10.renderObj {
...
}
...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 TYPO3 4.5.x(甚至可能是早期版本)中,您可以使用 选择。这使您可以定义可在其他
select
属性中使用的标记(例如 ###some_marker###)。In TYPO3 4.5.x (maybe even in earlier versions) you can use
markers
property of the select. This lets you define markers (e.g. ###some_marker###) that you can use in otherselect
properties.也许您可以使用寄存器来存储和累积开始变量并覆盖它?每次我的代码将寄存器变量“num”与 1(一种 t3 cookie 变量)相加,当您加载另一个页面时,它就会被删除。
Perhaps you can use a register to store and accumulate the begin variable and override it? Each time my code add up the register variable "num" with a 1 which is a kind of t3 cookie variable, it get erased when you load another page.