如何设置浏览菜单以循环页面和它';s子页面是否仅为typo3?
我正在尝试设置一个浏览菜单来循环一个页面及其子页面。我必须采用<2>格式,其中是下一页。为了重新喜欢它,我决定在父页面上放置一个扩展模板,其中浏览菜单指向子页面树的第一页:如何设置浏览菜单以循环页面和它';s子页面是否仅为typo3?,typo3,typoscript,Typo3,Typoscript,我正在尝试设置一个浏览菜单来循环一个页面及其子页面。我必须采用格式,其中是下一页。为了重新喜欢它,我决定在父页面上放置一个扩展模板,其中浏览菜单指向子页面树的第一页: lib.pagenumber = HMENU lib.pagenumber{ special = browse special.items = | next special.next.uid = 100 special.next.fields.title = 2 1 = TMENU 1{ noB
lib.pagenumber = HMENU
lib.pagenumber{
special = browse
special.items = | next
special.next.uid = 100
special.next.fields.title = 2
1 = TMENU
1{
noBlur = 1
expAll = 0
NO = 1
NO.ATagTitle = 1
NO.before = <div id="currLGMpg" class= "currpg">1</div>
NO.linkWrap = <div class=nextLGMpg>|</div>
}
}
lib.pagenumber=humenu
库页码{
特殊=浏览
special.items=| next
special.next.uid=100
special.next.fields.title=2
1=t菜单
1{
noBlur=1
expAll=0
否=1
否。ATagTitle=1
否之前=1
否链接包裹=|
}
}
当前页面没有链接,只是一个图像框,必须位于上一个链接和下一个链接之间,并自动编号。这是我试图解决的第二个问题。
对于子页面,我认为在第一个子页面上有一个模板,在Link包装上有选项拆分,可以为Primv和下一个链接设计,但是我不知道如何将当前页面的图像放在中间。
,所以我最终解决了一个问题。这是自动编号的页面。对于那些感兴趣的人,您需要将下一页和上一页分别映射到,以便可以在两者之间放置页码按钮。以下打字脚本代码位于要为其设置浏览按钮的页面的根页面树上:
#Next page button setup
lib.nextpage = HMENU
lib.nextpage.special = browse
lib.nextpage.special.items = next
#can't remove the page title some reason it just gets inserted back so we set it to nothing
lib.nextpage.special.next.fields.title =
#if we're on the parent page of the page tree we wish to browse next should point to the first page of the subtree.
[globalVar = TSFE:id = 46]
lib.nextpage.special.next.uid = 100
[global]
lib.nextpage.1 = TMENU
lib.nextpage.1{
noBlur = 1
expAll = 0
NO = 1
#NO.ATagTitle = 1
NO.linkWrap = <div class=nextLGMpg>|</div>
}
#Page number
lib.currpage = TEXT
#can't autonumber yet so put a 1 as a placeholder for the current page number
lib.currpage.value = 1
lib.currpage.wrap = <div id="currLGMpg">|</div>
#previous page button setup
#copy from next page setup; tbh all we gain is 1 less line code
lib.prevpage < lib.nextpage
lib.prevpage.special.items = prev
lib.prevpage.special.prev.fields.title =
#again if we're at the 1st subpage we need to target the parent page as that is page one.
[globalVar = TSFE:id = 100]
lib.prevpage.special.prev.uid = 46
#next line tests to see if we're at page 1. If we are we remove the prev object because browsing stops here.
[globalVar = TSFE:id = 46]
lib.prevpage >
[global]
lib.prevpage.1 = TMENU
lib.prevpage.1{
noBlur = 1
expAll = 0
NO = 1
#NO.ATagTitle = 1
NO.linkWrap = <div class=prevLGMpg>|</div>
}
#下一页按钮设置
lib.nextpage=humanu
lib.nextpage.special=浏览
lib.nextpage.special.items=下一个
#无法删除页面标题,因为它刚刚被插入,所以我们将其设置为“无”
lib.nextpage.special.next.fields.title=
#如果我们在页面树的父页面上,我们希望下一步浏览的页面应该指向子树的第一页。
[globalVar=TSFE:id=46]
lib.nextpage.special.next.uid=100
[全球]
lib.nextpage.1=TMENU
图书馆下一页1{
noBlur=1
expAll=0
否=1
#否。ATagTitle=1
否链接包裹=|
}
#页码
lib.currpage=文本
#无法自动编号,因此请将1作为当前页码的占位符
lib.currpage.value=1
lib.currpage.wrap=|
#上一页按钮设置
#从下一页复制设置;tbh我们得到的只是少一行代码
lib.prevpage
[全球]
lib.prevpage.1=TMENU
lib.prevpage.1{
noBlur=1
expAll=0
否=1
#否。ATagTitle=1
否链接包裹=|
}
一旦我知道如何自动编号,我将更新答案。您好,骑自行车您应该遵循以下步骤。这仅适用于下一步,请遵循与上一步相同的步骤
temp.lightbox_navi.30 = HMENU
temp.lightbox_navi.30 {
stdWrap.wrap = <li>|</li>
special = browse
special {
items = next
items.prevnextToSection = 0
next.fields.title = < next Projekt
}
1 = TMENU
1 {
NO = 1
}
stdWrap.ifEmpty.cObject = HMENU
stdWrap.ifEmpty.cObject {
special = browse
special {
items = first
items.prevnextToSection = 0
first.fields.title = < next Projekt o
}
1 = TMENU
1 {
NO = 1
}
}
}
temp.lightbox\u navi.30=HMENU
临时灯箱\u navi.30{
stdWrap.wrap=|
特殊=浏览
特别的{
项目=下一个
items.prevnextToSection=0
next.fields.title=
您能否显示您知道的输出以及您想要获得的内容?顺便说一句,为什么special.items不是“next | prev”?您可以使用dataWrap={debug:data}
查看所有相关数据。应该已经有一个寄存器或一个变量来记录应该得到数字的项目。无论如何,您可以通过humenu.TMENU.NO.stdWrap.*.lookitup*
更改链接的标题。