[TYPO3-content-rendering] Re: <f:link.tel tel="0049 123 456 7890" />

Gert-jan Dikkescheij gerry at newred.ch
Mon Aug 24 14:50:07 CEST 2015


Can't figure out how to handle an image in a custom content element, maybe trying already for a week, a single Reference to an image chosen by the editor to be written in a short inline css in the template...

know of any tutorial ?

so far:

tt_content.banner = FLUIDTEMPLATE
tt_content.banner {
    template = FILE
    template.file = EXT:scibile/Resources/Private/ContentElements/scibile_banner.html
    layoutRootPath = EXT:sitepackage/Resources/Private/Layouts/
    partialRootPath = EXT:sitepackage/Resources/Private/Partials/
    renderObj = IMAGE
    renderObj {
        file.import.data = file:current:publicUrl
        titleText = file:current:caption
        stdWrap.typolink.parameter.data = file:current:link
        stdWrap.wrap = |
    }
}

template:( the image should go in the third url line of the style)

    <div id="banner-wrapper"
      style=" background-image:
        url('typo3conf/ext/scibile/Resources/Public/Images/overlay.png'),
        url('typo3conf/ext/scibile/Resources/Public/Images/overlay.png'),
        url('fileadmin/scibile/images/banner.jpg');">
      <section id="banner">
        <div class="logo">
          <img src="fileadmin/scibile/images/logo_scibile_network.png">
        </div>
        <p>{data.subheader} - {data.image}</p>
        <f:image src="{data.image}" treatIdAsReference="1"/>
        <f:link.page pageUid="{data.header_link}" class="button">{data.header}</f:link.page>
      </section>
    </div>


More information about the TYPO3-project-content-rendering mailing list