[英]TYPO3: typoscript wrap two elements with div
is it possible to wrap always two <li>
elements in a div in typoscript? 是否有可能在打字稿中始终将两个<li>
元素包装在div中?
at the moment it looks like this: 现在看起来像这样:
navStatic = HMENU
navStatic {
special = directory
special.value = 2
excludeUidList = 2
1 = TMENU
1 {
expAll = 1
wrap = <ul class="headernavmenu">|</ul>
noBlur = 1
NO = 1
NO {
ATagTitle.field = title
wrapItemAndSub = <li>|</li>
allWrap = | I |*| | I |*| |
}
ACT < .NO
ACT.ATagParams = class="active_static"
}
}
thanks in advance 提前致谢
This addition to your TypoScript should do the job, just when an odd number of li
-elements is in the list the last single li
-element is not wrapped. 这除了你的Typo脚本应该做的工作,只是在奇数li
-elements是在列表的最后一个单li
-元素不裹。
NO.wrapItemAndSub.outerWrap = <div class="two-list-elements"> || || </div>
Be advised that this HTML-solution is error-prone as browsers might interpret it different or not at all because the HTML is not standard-conform. 请注意,此HTML解决方案容易出错,因为HTML不符合标准,因此浏览器可能对它的解释不同或根本不同。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.