Bug #24290
closedImage position "Beside text" is handled in a slightly od way
0%
Description
When using image positions "Beside text, right" (tt_content.imageorient = 25) and "Beside text, left" (imageorient = 26) the header has to be placed in a position different from the position when using other image positions (e.g. "In text, right").
However, the typoscript for handling this is based on "isLessThan" and "isGreaterThan" with the effect that all image positions with "imageorient" greater than 24 will be handled as "Beside text".
I suggest a change in EXT:css_styled_content/static/setup.txt to handle this specifically for the imageorient-values 25 and 26:
tt_content.textpic {
...
10.if.value = 25,26
10.if.isInList.field = imageorient
10.if.negate = 1
...
20 {
text.10 {
if.value = 25,26
if.isInList.field = imageorient
..
}
...
}
}
This change will make it easy to add new "Beside text" image positions and also make it easier to add new "In text" positions using "imageorient" values greater than 26.
Best regards,
Mikkel
(issue imported from #M16676)
Files
Updated by Christian Ludwig over 12 years ago
- File patch_16676_2.diff patch_16676_2.diff added
- Target version deleted (
0)
We would appreciate this change in CSC very much because there where many websites where we had to add dozens of lines of typo script in order to place the headline above or below the image.
We added a new patch where we used a constant for the 'if.values' lists what makes it very easy to place the headline individually for every 'image position' and +ext template! We also wrapped the complete body text analogue to the header in a div with the class 'csc-textpicBody' what offers extra css style possibilities without breaking old layouts.
What we use now (and for those who cannot wait until this will be deployed) is a constant
styles.content.imgtext.headlineBelow = 0,25,26
And the configuration
tt_content.textpic { 10.if > 10.if { value = {$styles.content.imgtext.headlineBelow} isInList.field = imageorient negate = 1 } 20.text.10.if > 20.text.10.if { value = {$styles.content.imgtext.headlineBelow} isInList.field = imageorient } 20.text.20.wrap = <div class="csc-textpicBody"> | </div> }
Updated by Ernesto Baschny over 12 years ago
- Status changed from New to Accepted
- TYPO3 Version set to 6.0
That sounds like a good plan (for 6.0), I like it.
Please make sure:
- You should not touch setup.txt for v4.7 as this is there exactly for compatibility reasons. People upgrading from 4.7 to 6.0 should be able to use the v4.7/setup.txt and expect it to work exactly like in 4.7.
- So you only change setup.txt
- Add a comment in css_styled_content/ext_localconf.php (in the compat_version part) documenting the change, so that a site implementator running the Upgrade Wizard will see (and confirm) a notice of this change explicitly before choosing the new setup.txt
If you could do that, and wrap that in a review request to GIT, it would be awesome!
See: http://wiki.typo3.org/Contribution_Walkthrough_Tutorials
Thanks for your help!
Updated by Christian Ludwig over 12 years ago
Hi Ernesto,
nice to hear that you like the idea. I thought this might find its way into the 4.7 release because it does not change the rendering except for the new div that will not break the display of existing sites because the class is not styled and what could be left off for v4.7 if necessary.
That's why I updated the 4.7/setup.txt.
So I am not sure what to write into the ext_localconf.php.
$TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['compat_version']['tx_cssstyledcontent_headlineposition'] = array( 'title' => 'CSS Styled Content: Headline position', 'version' => 6000000, 'description' => '<ul> <li>A new template constant styles.content.imgtext.headlineBelow was introduced that allows to define the position of headlines in "e;image & text"e; elements above or below the image</li> <li>The body text is wraped in an extra div with the class "e;csc-textpicBody"e;.</li> </ul>', 'description_acknowledge' => 'Watch out if you use any styles that may affect the new div of the body text (what would be very uncommon).' );
Updated by Ernesto Baschny over 12 years ago
It won't change the rendering if nobody has customized the typoscript (which most do!). Imagine a custom site has already modified this particular part of the typoscript. for example with such a (hypothetical) typoscript:
tt_content.textpic.10.if.value = 24
(just as an example). If you suddenly change the whole "if" to something different, this particular customization won't work as expected anymore.
Since we want to provide a very smooth transition between TYPO3 versions (a smooth upgrade path), we need to make sure even custom typoscript customizations still work as expected: The user can then still choose to use the "old rendering" (4.7) which allows him to run a 6.0 site with his "old customization".
So the alert in the upgrade wizard is to make sure the user is aware that customizations of "tt_content.textpic.10" or "tt_content.textpic.20.text.10.if" might get lost when choosing the new static template from css_styled_content. It doesn't need to also document the "new feature", just what is relevant for deciding to choose the "old way" or the "new way".
Updated by Gerrit Code Review over 11 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18586
Updated by Gerrit Code Review about 10 years ago
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34025
Updated by Benni Mack over 9 years ago
- Status changed from Under Review to Rejected
- Is Regression set to No
We won't add this feature anymore, as we are moving towards Fluid-based Content Elements.