Keep hidden headers (header_layout 100) out of the JSON
Applied on all three render paths: stdWrap.if rule on lib.contentElementWithHeader (before the plugin copies), the same rule in the container element definitions, and a HiddenHeaderProcessor behind the nb content-blocks data processor. headerLayout itself stays in the payload so the front end can tell why the header is empty.
This commit is contained in:
1 parent
5499ca54af
commit
5aad13e635
3 files changed
+82
No files matched your search
@@ -72,10 +72,22 @@ tt_content.vitec_cols_50_50 {
|
||||
}
|
||||
}
|
||||
|
||||
# header_layout 100 = "Hidden": header, subheader and headerLink stay
|
||||
# out of the JSON (same rule as lib.contentElementWithHeader).
|
||||
header = TEXT
|
||||
header.field = header
|
||||
header.stdWrap.if {
|
||||
value = 100
|
||||
equals.field = header_layout
|
||||
negate = 1
|
||||
}
|
||||
subheader = TEXT
|
||||
subheader.field = subheader
|
||||
subheader.stdWrap.if {
|
||||
value = 100
|
||||
equals.field = header_layout
|
||||
negate = 1
|
||||
}
|
||||
headerLayout = INT
|
||||
headerLayout.field = header_layout
|
||||
headerPosition = TEXT
|
||||
@@ -87,6 +99,11 @@ tt_content.vitec_cols_50_50 {
|
||||
parameter.field = header_link
|
||||
returnLast = result
|
||||
}
|
||||
stdWrap.if {
|
||||
value = 100
|
||||
equals.field = header_layout
|
||||
negate = 1
|
||||
}
|
||||
}
|
||||
tx_vitec_bg_variant = TEXT
|
||||
tx_vitec_bg_variant.field = tx_vitec_bg_variant
|
||||
|
||||
Reference in new issue
Block a user