#28603css-styled-content: suggestion to avoid spaghetti code "style" while taking another header-alignment than "standard"
Description
Hi all,
to avoid the style=“text-align:align-center;” (= Spaghetti code) in the header-rendering:
|
I modified this part of code like this:lib.stdheader {
// style= eliminate Spaghetti-Code!
// 1 = new register for csc-firstHeader
1 = LOAD_REGISTER
1.cscFirst = csc-firstHeader
1.cscFirst.if.value=1
1.cscFirst.if.equals.data = cObj:parentRecordNumber
1.cscFirst.wrap = |
// read the position of the data-record-title (header):
2 >
2 = LOAD_REGISTER
2.headerStyle.field = header_position
2.headerStyle.required = 1
2.headerStyle.noTrimWrap = |align-||
- Create class=“csc-firstHeader align-right/-center/-left” attribute for <Hx> tags
3 >
3 = LOAD_REGISTER
3.headerClass.stdWrap.dataWrap = {register:cscFirst} {register:headerStyle}
3.headerClass.required = 1
3.headerClass.noTrimWrap = | class=”|”|
// elimination of {register:headerStyle}:10.1.dataWrap =
|
10.2.dataWrap =
|
10.3.dataWrap =
|
10.4.dataWrap =
|
10.5.dataWrap =
|
}
In addition you have to put standard classes into the CSS like:
*.align-left
.align-right
.align-center*
Perhaps you’ll put it into the new code for one of the next TYPO3 versions!?
Kind regards from Jülich
Kurt Kunig
kupix webdesign
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.