Reputation: 143
I'm trying to render the HTML for headers and subheader when I have a link set for the header. Right now I have the following HTML being rendered:
<h1>
<a href="/my-link/">Header Text</a>
<small>Sub Header Text</small>
</h1>
<h1>
<a href="/my-link/">Header Text <small>Sub Header Text</small></a>
</h1>
Any help?
The current typoscript comes from the Bootstrap Package:
lib.stdheader {
3 {
headerClass {
cObject {
10 {
field = header_position
required = 1
noTrimWrap = |text-| |
}
}
}
}
5 >
10 >
10 = CASE
10 {
setCurrent {
field = header
htmlSpecialChars = 1
typolink.parameter.field = header_link
}
key {
field = header_layout
ifEmpty = {$content.defaultHeaderType}
ifEmpty.override.data = register: defaultHeaderType
}
1 = COA
1 {
10 = TEXT
10.current = 1
20 = TEXT
20 {
field = subheader
stdWrap.noTrimWrap = | <small>|</small>|
stdWrap.required = 1
}
stdWrap.dataWrap = <h1{register:headerClass}>|</h1>
stdWrap.required = 1
}
(...)
}
}
Upvotes: 1
Views: 641
Reputation: 4578
Move the typolink.parameter.field = header_link
to the stdWrap.
at the bottom.
Upvotes: 1