0

I'm using TYPO3 4.2.8 and tt_news 2.5.2. I tried the following snippet:

plugin.tt_news.displaySingle {
    image {
        # turn off default popup anchor
        imageLinkWrap = 0
        # add our link to the first URL in links field
        stdWrap.typolink {
            parameter = {current:1}
            parameter {
            setCurrent.field = links
            setCurrent.listNum = 0
                insertData = 1
        }
        }
    }
}

Then I added an image to my news and also put a link into the link field (in the tab relations).

<LINK http://www.yourwesite.com/fileadmin/user_upload/downloads/broschure.pdf _blank>Download brochure</LINK>

But if I look at the news I don't have a link on the image. What do I have to change to get it work with my old version of tt_news?

Edit:

Now I tried it with gernericmarkers (idea from this topic). My TS looks like the following:

temp.img = COA
temp.img.5 = IMAGE
temp.img.5 < plugin.tt_news.displaySingle.image
temp.img.5 {
    required = 1
    wrap = |
    file {
        import = uploads/pics/
        import.field = image
        import.listNum = 0
    }
    titleText.field = title
    altText.field = title
    if.isTrue.field = links
    imageLinkWrap.typolink.parameter.data = field:links
}

plugin.tt_news.genericmarkers.imagewithlink < temp.img

The marker is working but there is no content displayed in the news. What is wrong with my TS?

testing
  • 19,681
  • 50
  • 236
  • 417

2 Answers2

0

I don't know if this works in your old tt_news version but at least from version 3.0+ you can simply use the marker <!--###LINK_ITEM###--> around your image <!--###LINK_ITEM###--> inside your template to link anything you like to the detail page.

qualle
  • 1,347
  • 3
  • 14
  • 29
0

Your first snippet works, but you have to insert the link without the tags into the link field. e.g.

http://www.yourwesite.com/fileadmin/user_upload/downloads/broschure.pdf _blank
mirsch
  • 168
  • 7