[TYPO3-english] link image with typolink

Christopher Torgalson bedlamhotel at gmail.com
Mon Feb 15 19:41:41 CET 2010


Hi,

On Mon, Feb 15, 2010 at 9:22 AM, De Contardi Riccardo
<Riccardo.DeContardi at bhuman.it> wrote:
> Hello
>
> The question is quite trivial, but...
>
>
>
> I want to link an image via typolink; this is my code:
>
>
>
> plugin.tt_news.genericmarkers{
>
>            facebooklink = IMAGE
>
>            facebooklink.file =
> fileadmin/templates/bhuman/assets/img_layout/facebookln.gif
>
>            facebooklink.stdWrap.typolink.parameter.field=
> tx_bhlgpresslnks_fcbk
>
> }
>
>
>
> But... in this way, the image is always present, even if there is no
> link.
>
> Is it possible to remove the image if no link is present?


Add this line:

  facebooklink.if.isTrue.field = tx_bhlgpresslnks_fcbk

This makes the rendering of the entire image conditional on the
tx_bhlgpresslnks_fcbk field's value. If it's not set, the image is not
rendered.

-- 
Christopher Torgalson
http://www.typo3apprentice.com/


More information about the TYPO3-english mailing list