1
我目前正在与typoscript拼搏。我需要归档的是在某个页面的所有页面(级别1,级别2)中都有一个选择框。因此,我们假设我有一个名为“产品”的页面,它具有子产品“产品1”和“产品2”。 “产品1”和“产品2”都有其他自己的子项目。现在TYPO3所有页面的选择下拉列表(1级和2级)
,我得到了下面的脚本:
temp.drop_down_box = COA
temp.drop_down_box {
10 = HMENU
10 {
# Special menu type 'directory': Get subpages of the current page
special = directory
# '123' is the uid of the page, for which the subpages shall be listed in the drop down box
special.value = 35
# Select box with JavaScript event 'onChange' that enables a jump to the target page, once an entry has been selected in the list
wrap = <select name="dropdown_navigation" size="1" onChange="document.location.href='index.php?id=' + this.value">|</select>
1 = TMENU
1 {
expAll = 1
noBlur = 1
NO {
# 'value' holds the uid of the page in the list (is later appended to the target URL above)
stdWrap.dataWrap = <option value="{field:uid}">
allWrap = |</option>
# Don't wrap the items in link tags
doNotLinkIt = 1
}
# Inherit the 'allWrap' and 'doNotLinkIt' settings from the NO part
CUR < copy">.NO
CUR = 1
CUR {
# If we're on the current page, mark this list entry as 'selected'
stdWrap.dataWrap = <option value="{field:uid}" selected="selected">
}
}
}
}
它工作得很好,但只在一个水平上。我想这样:
Product
- Product 1
- Item 1
- Item 2
- Item 3
- Item 4
- Product 2
- Item 1
- Item 2
- Item 3
...等等。
有没有办法做到这一点?
最好的问候, 安德烈亚斯
*编辑:得到它的工作:
temp.drop_down_box = COA
temp.drop_down_box {
10 = HMENU
10 {
// ... {code from first part of question here} ...
// additional levels copying 1 level and changing required values
2 < .1
2.NO.linkWrap = <option value="{field:uid}">-- |</option>
3 < .1
3.NO.linkWrap = <option value="{field:uid}">---- |</option>
}
}
谢谢,它做到了! :) – Andreas 2012-07-10 08:05:46