Skip to content
Snippets Groups Projects

[FEATURE] xBlog Main: size for image by typoscript and plugin #6760

Merged Dirk Wildt requested to merge 6760_feature_image_size_mode into master
3 files
+ 36
12
Compare changes
  • Side-by-side
  • Inline
Files
3
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:media
class="image-embed-item copyright@aufgequz"
file="{file}"
width="{dimensions.width}c"
height="{dimensions.height}c"
alt="{file.alternative} {file.properties.copyright -> f:format.stripTags()}"
title="{file.title} {file.properties.copyright -> f:format.stripTags()}"
loading="{settings.media.lazyLoading}"
/>
</html>
{namespace vh = Netzmacher\Xblog\ViewHelpers}
<f:variable name="sizemode"><vh:getregister register="settings.flexform.pi.image.imageSizemodeSingle" mustnotset="1" /></f:variable>
<f:variable name="height"><f:cObject typoscriptObjectPath="plugin.tx_xblog_pi1.settings.general.constants.image.single.height" /></f:variable>
<f:variable name="width"><f:cObject typoscriptObjectPath="plugin.tx_xblog_pi1.settings.general.constants.image.single.width" /></f:variable>
<f:if condition="{sizemode}==''">
<f:variable name="height">{dimensions.height}</f:variable>
<f:variable name="width">{dimensions.width}</f:variable>
</f:if>
<f:if condition="{sizemode}=='record'">
<f:variable name="height">{dimensions.height}</f:variable>
<f:variable name="width">{dimensions.width}</f:variable>
</f:if>
<f:if condition="{sizemode}=='plugin'">
<f:variable name="height"><vh:getregister register="settings.flexform.pi.image.imageHeightSingle" mustnotset="1" /></f:variable>
<f:variable name="width"><vh:getregister register="settings.flexform.pi.image.imageWidthSingle" mustnotset="1" /></f:variable>
</f:if>
<f:media
class="image-embed-item copyright@aufgequz"
file="{file}"
width="{width}c"
height="{height}c"
alt="{file.alternative} {file.properties.copyright -> f:format.stripTags()}"
title="{file.title} {file.properties.copyright -> f:format.stripTags()}"
loading="{settings.media.lazyLoading}"
/>
Loading