I have a small problem with typoscript
.
My Question is, is there the possibility to give all external links a separate css-class
with typoscript
in the front-end?
I have a small problem with typoscript
.
My Question is, is there the possibility to give all external links a separate css-class
with typoscript
in the front-end?
lib.mainNav = HMENU
lib.mainNav {
1 = TMENU
1 {
wrap = <ul class="nav navbar-nav">|</ul>
NO = 1
NO {
wrapItemAndSub = <li class="f1">|</li> || <li class="f2">|</li> |*| <li class="m1">|</li> || <li class="m2">|</li> |*| <li class="l1">|</li> || <li class="l2">|</li>
ATagTitle.field = title // subtitle
ATagParams = calss="f" data-doktype="doktype_{field:doktype}"
ATagParams.insertData = 1
wrapItemAndSub.override.cObject = COA
wrapItemAndSub.override.cObject {
if {
value = 3
equals.field = doktype
}
10 = TEXT
10.value = <li class="externLi">|</li>
}
ATagParams {
override.cObject = COA
override.cObject {
if {
value = 3
equals.field = doktype
}
10 = TEXT
10.value = calss="extern" data-doktype="doktype_{field:doktype}"
if {
value = 4
equals.field = doktype
}
10 = TEXT
10.value = calss="shortcut" data-doktype="doktype_{field:doktype}"
}
}
stdWrap.case = upper
}
}
}
As in my installations external links should open in a new window all external links are rendered with
target="_blank"
this could be used in CSS to change appearance:You can define the target used for external links (
config.extTarget
) but the handling is not done in typoscript. If you want a similar handling for CSS you need to do it at the same place.