[英]TYPO3 cropVariants and Fluid
由於TYPO3 8.7具有用於響應圖像的不錯的cropVariants選項,因此我想知道如何最好地實現這一點:
在stackoverflow文檔'image-cropping-typo3-8-7-lts'(不允許鏈接)的示例中,做了一些tsconfig來啟用裁剪變體。
然后它將可用於內容元素中的所有圖像,如何最好地調整流體樣式的內容模板?
例如,fluid_styled_content / Resources / Private / Partials / Media / Type / Image.html指向fluid_styled_content / Resources / Private / Partials / Media / Rendering / Image.html,其中包含
<f:media class="image-embed-item" file="{file}" width="{dimensions.width}" height="{dimensions.height}" alt="{file.alternative}" title="{file.title}" />
有沒有人舉過一個例子,如何替換這個特定部分? 還是僅允許自定義內容元素允許裁剪變體?
您必須在圖像viewhelper中將CropVariant添加為屬性-使用f:media無效,我認為...
例如:
<f:image src="{uid}" treatIdAsReference="1" cropVariant="smartphone" maxWidth="{imagemaxwidth}" maxHeight="{imagemaxheight}" />
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.