1
我使用typoscript(新增功能)來處理我的網站的菜單欄,我想使用菜單條目旁邊的fontawesome圖標。Typo3菜單與字體真棒圖標
這是模型的樣子:
這是我的菜單看起來怎麼樣:
現在,我的菜單Typo腳本分部看起來是這樣的:
SUBNAV = HMENU
SUBNAV {
entryLevel = 0
1 = TMENU
1 {
expAll = 1
collapse = active
noBlur = 1
# Definition per page
# NO: default formatting
NO = 1
NO {
wrapItemAndSub = <li >|</li>
stdWrap.wrap = <i class="fa fa-plus"></i><span>|</span>
}
# ACT: User is on this or below this page
# Activate this state for this menu
ACT < .NO
ACT {
wrapItemAndSub = <li class="active">|</li>
}
CUR < .ACT
# try to check if submenu to add a arrow icon
IFSUB = 1
IFSUB{
wrapItemAndSub = <li class="first">|</li>|*|<li>|</li>|*|<li class="last">|</li>
linkWrap = |<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
ATagBeforeWrap = 1
stdWrap.wrap = <i class="fa fa-plus"></i><span>|</span>
}
ACTIFSUB = 1
ACTIFSUB < .ACT
ACTIFSUB.linkWrap = |<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
ACTIFSUB.ATagBeforeWrap = 1
CURIFSUB = 1
CURIFSUB < .ACTIFSUB
}
2= TMENU
2 {
expAll = 1
collapse = active
noBlur = 1
wrap = <ul class="treeview-menu">|</ul>
# Definition per page
# NO: default formatting
NO = 1
NO {
wrapItemAndSub = <li >|</li>
}
# ACT: User is on this or below this page
# Activate this state for this menu
ACT < .NO
ACT {
wrapItemAndSub = <li class="active">|</li>
}
CUR < .ACT
# try to check if submenu to add a arrow icon
IFSUB = 1
IFSUB{
wrapItemAndSub = <li class="first">|</li>|*|<li >|</li>|*|<li class="last">|</li>
linkWrap = |<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
ATagBeforeWrap = 1
}
ACTIFSUB = 1
ACTIFSUB < .ACT
ACTIFSUB.linkWrap = |<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
ACTIFSUB.ATagBeforeWrap = 1
CURIFSUB = 1
CURIFSUB < .ACTIFSUB
}
# Definition for pages on level 3 and lower
# Copy the definitions from level 2
3 < .2
# 3.wrap = <ul class="treeview-menu">|</ul>
# Copy the definitions from level 2
4 < .2
# 4.wrap = <ul class="treeview-menu">|</ul>
# Copy the definitions from level 2
5 < .2
# 5.wrap = <ul class="treeview-menu">|</ul>
# Copy the definitions from level 2
6 < .2
# 6.wrap = <ul class="treeview-menu">|</ul>
}
現在,我的問題是我不知道如何將不同的圖標(我選擇的)與不同的菜單(1級中的圖標)相關聯。正如你在typoscript中看到的,我使用了fa圖標,但對於每個菜單項(fa fa-plus)都是相同的。 有什麼建議嗎?
有些東西是基於下面的消化而改變的,但我還沒有完全消除。我修改的Typo腳本沒有進入:\t \t \t \t \t \t \t \t \t NO { \t \t \t \t \t \t \t \t \t \t wrapItemAndSub =