[TYPO3-mvc] Render responsive images like TS sourceCollection?

Marc Wöhlken woehlken at quadracom.de
Fri May 30 11:50:58 CEST 2014


Hi Marcelo!

Am 28.05.2014 23:58, schrieb Marcelo Vetter:
> Thanks for your reply Philipp.
> 
> I understand the concept. But I'm not a Extbase programer yet. Do you have any example where I could be based on?
> 
> I just don't understand why on Typo3 bootstrap package they do that format via TypoScript and don't have any similar thing on Fluid. It's kinda frustrating you know.

Found a TS based soulution that works very well for me.

You can use the fluid cObject-Viewhelper for rendering
responsive/adaptive images.

A reference can be found at
http://docs.typo3.org/typo3cms/ExtbaseFluidBook/8-Fluid/5-using-typoscript-for-rendering-the-cobject-viewhelper.html

Working example from my extension:

Fluid template:
<div class="flexslider">
  <ul class="slides">
    <f:for each="{reference.images}" as="image">
      <li>
        <f:cObject typoscriptObjectPath="lib.myExt.detailPic">
          {f:uri.image(src:image.uid,treatIdAsReference:1)}
        </f:cObject>
        <div class="flexslide-content top left">
          <p>{image.originalResource.title}</p>
        </div>
      </li>
    </f:for>
    </ul>
</div>

TS setup:
lib.myExt {
    listPic = IMAGE
    listPic {
        file.import.current = 1

        // Copy rendering setup from
        layoutKey < qcom.imageoptions.layoutKey
        layout.picturefill < qcom.imageoptions.layout.picturefill
        sourceCollection < qcom.imageoptions.sourceCollection

    }
}


Hope that helps

CU
Marc

-- 
...........................................................
Marc Wöhlken                     TYPO3 certified integrator

Quadracom - Proffe & Wöhlken

Rembertistraße 32              WWW: http://www.quadracom.de
D-28203 Bremen                E-Mail: woehlken at quadracom.de
______________             PGP-Key: http://pgp.quadracom.de


More information about the TYPO3-project-typo3v4mvc mailing list