Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/fsharp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Select 键入3选择所有页面的下拉列表(级别1和2)_Select_Typo3_Typoscript - Fatal编程技术网

Select 键入3选择所有页面的下拉列表(级别1和2)

Select 键入3选择所有页面的下拉列表(级别1和2),select,typo3,typoscript,Select,Typo3,Typoscript,我目前正在努力打字。我需要归档的是一个包含某个页面的所有页面(级别1、级别2)的选择框 因此,假设我有一个名为“Products”的页面,其中有子项“Product1”和“Product2”。“产品1”和“产品2”都有自己的子项 现在,我得到了以下脚本: temp.drop_down_box = COA temp.drop_down_box { 10 = HMENU 10 { # Special menu type 'directory': Get subpages of th

我目前正在努力打字。我需要归档的是一个包含某个页面的所有页面(级别1、级别2)的选择框

因此,假设我有一个名为“Products”的页面,其中有子项“Product1”和“Product2”。“产品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">
       }
     }
  }
}
。。。等等

有没有办法做到这一点

致以最良好的祝愿, 安德烈亚斯

*编辑:开始工作:

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>

  }
}
temp.drop\u down\u box=COA
温度下拉框{
10=汉努
10 {
//…{问题第一部分的代码}。。。
//其他级别复制1个级别并更改所需值
2 < .1
2.NO.linkWrap=--|
3 < .1
3.NO.linkWrap=--|
}
}

对于每个菜单级别,您需要添加下一个TMENU声明:

1 = TMENU
1 {
   ...
}

2 = TMENU
2 {
   ...
}

99 = TMENU
99 {
   ...
}
1 = TMENU
1 {
   ...
}

2 = TMENU
2 {
   ...
}

99 = TMENU
99 {
   ...
}