[TYPO3-english] typoscript: get rid of image reference number

Katja Lampela katja.lampela at lieska.net
Thu Nov 8 21:08:53 CET 2012


8.11.2012 22:03, Katja Lampela kirjoitti:
> Hi,
>
> I have a typoscript situation where I need two different path links to one uploaded image. Let me explain.
>
> The database has high resolution press images which I want to show with typoscript as a small image (from uploads/myext/ folder) and as a download link from the original fileadmin/highres folder.
>
> Basically I need something like:
>
> <a href="fileadmin/highres/myimage.jpg"><img src="uploads/myext/myimage.jpg" />

of course it should be
<a href="fileadmin/highres/myimage.jpg"><img src="uploads/myext/myimage.jpg" /></a>


> The "myimage.jpg" is uploaded in backend record. Problem arises when the image is uploaded second time, then we have
>
> <a href="fileadmin/highres/myimage_01.jpg"><img src="uploads/myext/myimage_01.jpg" />
>
> and of course there is no myimage_01.jpg in fileadmin/highres and the link doesn't work anymore.
>
> So now I need a clever way to either crop the _number part from link or force the image upload always keep the original name.
>
> Any ideas or is it even possible?
>

One clumsy way is to add a db text input field and manually the filename. But it is not the ideal way obviously :)


More information about the TYPO3-english mailing list