0

Unfortunately I'm still using TYPO3 7.6, but it's the same in principle like the latest TYPO3 CMS, so I also use Fluid_styled_content .. uff!

I've included the lazy load javascript plugin into my TYPO3-Website and now I try to change the FLUID-partial typo3conf/ext/myext/Resources/Private/Extensions/Fsc/Partials/MediaGallery.html - but I've a probem with this .. because my changing in line 'file' throws an error. I try it with or without " or \" ..

<f:section name="media">

    <f:media
        file="{f:uri.image(src: \"EXT:/myext/Resources/Public/img/icons/blank.gif\", treatIdAsReference:1}"
        class="lazyload" 
        data="{src: '{f:uri.image(image: column.media)}'}"  
        width="{column.dimensions.width}"
        height="{column.dimensions.height}"
        alt="{column.media.alternative}"
        title="{column.media.title}"
    />

</f:section>

I've changed file="{column.media}" , because I want to load my 'blank.gif' instead of the image himself.

Argument 1 passed to TYPO3\CMS\Core\Resource\Rendering\RendererRegistry::getRenderer() must implement interface TYPO3\CMS\Core\Resource\FileInterface, string given, called in C:\www\typo3_src-7.6.31\typo3\sysext\fluid\Classes\ViewHelpers\MediaViewHelper.php on line 90

The output is like this:

<img data-src="/fileadmin/user_upload/admins.jpg" class="lazyload" src="/fileadmin/user_upload/admins.jpg" width="280" height="176" alt="">

Lazy load is working perfect, but I have to load the blank.gif. Is there a solution to manipulate the FSC-partials or do I need a new ViewHelper, like this?

user2310852
  • 1,654
  • 1
  • 25
  • 52
  • Instead of \" I would just use ' – ESP32 Dec 19 '18 at 16:52
  • don't you think it a little bit strange if you provide a path to the file AND instruct the viewhelper to treat it as an Id (sys_file_reference record)? – Bernd Wilke πφ Dec 20 '18 at 10:03
  • Hello. \" or " or ' is not working. The behaviour is like it is. I've made the same procedure on another (third pary) extension. You'll set only the blank.gif. And the path i located in `data-src`. – user2310852 Dec 20 '18 at 11:30
  • There's a extension in TER: lazyfxx. But I think you wouldn't need an extension for this, wouldn't you? This extension overwrite or extend the ImagfeViewHelper from FLUID. – user2310852 Dec 20 '18 at 11:48

0 Answers0