Loading...
Skip navigation

Display contact person images

If you would like to display an image of your contact person in the real estate detailed view you can do so by using the assigned email address. We simply get the direkte E-Mailadresse and compare it. If there is a match the image is displayed. In fluid it can look something like this:

<f:switch expression="{oi:getProperty(object: immobilie, index: 'kontaktperson_emailDirekt')}">
    <f:case value="ansprechpartner-a(at)typo3-openimmo(dot)de">
        --> Bild von Ansprechpartner a anezigen!
    </f:case>
    <f:case value="ansprechpartner-b(at)typo3-openimmo(dot)de">
        --> Bild von Ansprechpartner b anezigen!
    </f:case>
    <f:case default="1">
        Es trifft keine Mailadresse zu - wir zeigen bspw. ein Dummy-Bild.
    </f:case>
</f:switch>

Contacts that are updateable by an editor

In the PRO version contacts can be updated by an editor. A Contact Person data record for each contact will need to be created in the OpenImmo data container. You then simply need to add the email address and the image. You can then set the contact person image in fluid as follows:

<oi:variable.set name="email" value="{oi:getProperty(object: immobilie, index: 'kontaktperson_emailDirekt')}" />
<oi:variable.set name="contactPersonImage" value="{oi:contactPerson.image(email: email)}" />
<f:if condition="{contactPersonImage}">
    <f:then>
        <f:image src="{contactPersonImage.uid}" treatIdAsReference="1" />
    </f:then>
    <f:else>
        Kein Bild gefunden
    </f:else>
</f:if>

PDF of contacts that can be updated by an editor

The contacts that can be updated by editors are also available as a PDF file:

<!-- Contact person image -->
<oi:variable.set name="email" value="{oi:getProperty(object: immobilie, index: 'kontaktperson_emailDirekt')}" />
<oi:variable.set name="contactPersonImage" value="{oi:contactPerson.image(email: email)}" />
<f:if condition="{contactPersonImage}">
    <f:then>
        <fpdf:setFont family="{labelFontName}" style="{labelFontStyle}" size="{labelFontSize}" />
        <fpdf:setTextColor hex="{labelColor}" />
        <fpdf:setXY x="165" y="100" />
        <fpdf:multiCell width="50" height="5" text="Ihr Ansprechpartner" border="{debug}" />

        <fpdf:image x="165" y="105" height="30" filename="{f:uri.image(src: contactPersonImage.uid, treatIdAsReference: 1)}" />

        <fpdf:setFont family="{textFontName}" style="{textFontStyle}" size="{textFontSize}" />
        <fpdf:setTextColor hex="{textColor}" />
        <fpdf:setXY x="165" y="135" />
        <fpdf:multiCell width="50" height="5" text="{contactPersonImage.originalResource.title}" border="{debug}" />
    </f:then>
    <f:else>
        <f:comment>No contact person assigned to email</f:comment>
    </f:else>
</f:if>

Contact request

You can contact us at any time

Stop! Playing in the meantime?

Break the highscore

Press Start
Contact request
Screenreader label
Security question
CAZ_________OLW______
__3____R____2_F___HMB
HT7___93Y___S_2______
E______R____G_S___KMD
IWJ_________BH2______