0

Users should be able to insert images on a news. If they are inserted they should open with fancybox. Therefore I installed jqfancybox. Now the images added as media opens in the fancybox and the user is able to click through all images (like a gallery). What do I have to do to also open images inserted by the RTE?

I tried the following typoscript:

plugin.tt_news.displaySingle.image.imageLinkWrap {
  JSwindow = 0
  directImageLink = 1
  linkParams.ATagParams { 
    dataWrap = class="jqfancybox" rel="fancybox"
  }
}

The idea is if an user inserts an image with the option "click enlarge" the above shown class should be added as well as the rel attribute. The rest should do the fancybox. But for existing images no class is added and fancybox doesn't pop up. What I'm missing?

Edit:

Now I tried it with:

plugin.tt_news.displaySingle.content_stdWrap.parseFunc {
  postUserFunc.imageLinkWrap.typolink{
    ATagParams { 
      dataWrap = class="jqfancybox" rel="fancybox"
    }
  }
}

but the link is not wrapped.

testing
  • 19,681
  • 50
  • 236
  • 417

1 Answers1

0

RTE content is parsed via parseFunc < lib.parseFunc_RTE. So if you want to change the config, you need to configure plugin.tt_news.displaySingle.content.parseFunc.* (i am not sure, if the field is content or bodytext or whatever)

lib.parseFunc_RTE is a default Config for parsing RTE content. It is quite powerful, but you need to lookup a lot of TypoScript functions.

maholtz
  • 3,631
  • 1
  • 17
  • 17
  • I tried it (see edited question). Also `plugin.tt_news.displaySingle.content_stdWrap.parseFunc.tags.img.postUserFunc.imageLinkWrap.typolink.ATagParams` didn't work. – testing May 08 '12 at 10:55
  • postUserFunc ist only for your own PHP functions. So, that cannot work, postUserFunc does not know imageLinkWrap. If img is a IMAGE Object just try img.imageLinkWrap... but you need to check if the TypoScript is valid. You do not get error messages, if you define not existing properties! – maholtz May 08 '12 at 11:52