Integrate variable content element header level
Use hidden for fluid if selected. Calculate concrete h level based on selected one plus relative level, which is 1 for now.
This commit is contained in:
parent
9d39eac0b9
commit
ad4fee5213
3 changed files with 26 additions and 4 deletions
|
@ -12,6 +12,29 @@ lib.contentElement {
|
||||||
10 = EXT:ds_site/Resources/Private/Layouts/ContentElements/
|
10 = EXT:ds_site/Resources/Private/Layouts/ContentElements/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variables {
|
||||||
|
headerLayout = COA
|
||||||
|
headerLayout {
|
||||||
|
10 = TEXT
|
||||||
|
10 {
|
||||||
|
if {
|
||||||
|
value = 100
|
||||||
|
equals.field = header_layout
|
||||||
|
}
|
||||||
|
value = hidden
|
||||||
|
}
|
||||||
|
20 = TEXT
|
||||||
|
20 {
|
||||||
|
if {
|
||||||
|
value = 100
|
||||||
|
isLessThan.field = header_layout
|
||||||
|
}
|
||||||
|
stdWrap.dataWrap = {field:header_layout} + 1
|
||||||
|
prioriCalc = intval
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
stdWrap {
|
stdWrap {
|
||||||
editIcons = tt_content:
|
editIcons = tt_content:
|
||||||
editIcons {
|
editIcons {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<f:render section="Header" arguments="{_all}" optional="1">
|
<f:render section="Header" arguments="{_all}" optional="1">
|
||||||
{f:render(partial: 'Header', arguments: {
|
{f:render(partial: 'Header', arguments: {
|
||||||
uid: data.uid,
|
uid: data.uid,
|
||||||
layout: data.header_layout,
|
layout: headerLayout,
|
||||||
header: data.header
|
header: data.header
|
||||||
})}
|
})}
|
||||||
</f:render>
|
</f:render>
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
<html xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
|
<html xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
|
||||||
data-namespace-typo3-fluid="true">
|
data-namespace-typo3-fluid="true">
|
||||||
<a name="c{uid}"></a>
|
<a name="c{uid}"></a>
|
||||||
<f:if condition="{layout} != 100">
|
<f:if condition="{layout} != 'hidden'">
|
||||||
<!-- TODO: Map header_layout and use mapped value -->
|
<h{layout}>{header} <small><a href="#c{uid}">¶</a></small></h{layout}>
|
||||||
<h2>{header} <small><a href="#c{uid}">¶</a></small></h2>
|
|
||||||
</f:if>
|
</f:if>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue