Project

General

Profile

Actions

Bug #28350

closed

imageLinkWrap and StdWrap Inconsistent

Added by Sebastian Steinmetz over 13 years ago. Updated almost 13 years ago.

Status:
Closed
Priority:
Should have
Category:
Image Cropping
Target version:
Start date:
2011-07-20
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.6
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When using imageLinkWrap and using JSWindow, the stdWrap is applied to the image itself, and the link is surrounded:

<a href="">
  STDWRAP
    <img>
  STDWRAP
</a>

But when not using JSWindow, but directImageLink, the stdWrap is applied to the link too:

STDWRAP
  <a href="">
    <img>
  </a>
STDWRAP

It would be helpful inserting (via stdWrap.innerWrap for example) something inside the link tags as it would be possible when using JSWindow. So the stdWrap should be applied before adding the typolink.


Related issues 2 (0 open2 closed)

Is duplicate of TYPO3 Core - Bug #25036: stdWrap in imageLinkWrap only renders when image_zoom is selectedClosed2011-02-14

Actions
Is duplicate of TYPO3 Core - Bug #18606: tt_content.image.20.1.stdWrap.wrap redered at wrong placeClosed2008-04-11

Actions
Actions #1

Updated by Jo Hasenau over 13 years ago

there is nothing like

STDWRAP
<img>
STDWRAP

since stdWrap is just a toolset that provides different functions that of course can be wraps but something completely different as well.

If you need something that will be applied to the image you just have to put the stdWrap function in the correct place, so that it will always be applied to the image before any other function.

So I don't see what exactly the core could/should do for you in this case.

Actions #2

Updated by Mr. Hudson over 13 years ago

Patch set 2 of change Ic70edcf9f6533f1d866eb138cd087f245af91e79 has been pushed to the review server.
It is available at http://review.typo3.org/3438

Actions #3

Updated by Sebastian Steinmetz over 13 years ago

The Problem with imageLinkWrap.stdWrap is that it applies to different parts of the generated HTML, when you use it with imageLinkWrap.JSWindow=1 and with imageLinkWrap.JSWindow = 0.

The "code" posted in my original bugreport with the STDWRAP was just explanatory. It should emphasize the point where the stdWrap functionality is applied. One time it is applied to just the stuff right inside the a-tags, and once to everything including the a-tags.

The documentation of the tsref is not very clear to this either. It just says "Enable stdWrap for the image". But my intuitive understanding was, that it is intended to be applied on the stuff inside the link-tags, and not to the link as well.

What I am trying to do is this: add a custom <div> right after the <img> tag, but still inside the a-tags, which will make a little loupe icon on (or after) the image, when the image can be magnified.

The typoscript-code for this is:
Constants:

styles.content.imgtext.linkWrap.lightboxEnabled = 1
styles.content.imgtext.linkWrap.lightboxRelAttribute = lightbox[sb{field:uid}]

Setup:

tt_content.image.20.1.imageLinkWrap.stdWrap.innerWrap = |<div class="magnify_overlay">&nbsp;</div>

Resulting in the following html-code:

<a href="…" title="…" class="lightbox" rel="lightbox[sb137]">
  <img src="…" width="210" height="141" border="0" alt="…">
  <div class="magnify_overlay">&nbsp;</div>
</a>

I hope it is understandable, what was intended by submitting this patch. If not, please feel free to ask again :) Maybe we could also quickly discuss it in german, as I think a lot of the core dev people are from here too.

Actions #4

Updated by Jo Hasenau over 13 years ago

You just discovered that you should not apply the stuff you want to add to imageLinkWrap.

So this is not a bug of TYPO3 but just the wrong place to do it.
If you want something to be added after the image, you should do it at the right place, which is the image itself and not any surrounding wrap.

Actually the problem is, that you are using linkWrap to generate the lightbox stuff, which is something completely different than imageLinkWrap AND (according to TSref) will be applied to the image before the "wrap" parameter of the image itself, while imageLinkWrap will be applied after it.

Actions #5

Updated by Chris topher about 13 years ago

  • Target version changed from 4.6.0 to 4.6.1
Actions #6

Updated by Chris topher almost 13 years ago

  • Target version changed from 4.6.1 to 4.6.2
Actions #7

Updated by Gerrit Code Review almost 13 years ago

  • Status changed from New to Under Review

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/3438

Actions #8

Updated by Steffen Gebert almost 13 years ago

  • Status changed from Under Review to Rejected
  • Assignee set to Steffen Gebert
Actions #9

Updated by Xavier Perseguers almost 13 years ago

  • Status changed from Rejected to Closed
Actions

Also available in: Atom PDF