[TYPO3-dev] how to get title and anker while ressource image integration in TypoScript
martol man
eigentlichimmer at abwesend.de
Thu Mar 5 18:17:25 CET 2015
Hi,
I need to implement page ressource images by TypoScript for a frontend teaser image slider. I wonder how to get the title attribut information from ressource images.
At the moment I am using such an implementation to create image tags with path in it:
resssourceimage = COA
resssourceimage {
1 = COA
1 {
stdWrap.required=1
stdWrap.outerWrap.cObject = TEXT
stdWrap.outerWrap.cObject.value = <div class="imageitem">|</div>
2 = IMAGE
2 {
file {
import.data = levelmedia:-1, slide
import = uploads/media/
import.listNum = 0
treatIdAsReference = 1
}
}
}
2 < .1
2.2.file.import.listNum = 1
3 < .1
3.2.file.import.listNum = 2
4 < .1
4.2.file.import.listNum = 3
5 < .1
5.2.file.import.listNum = 4
6 < .1
6.2.file.import.listNum = 5
7 < .1
7.2.file.import.listNum = 6
8 < .1
8.2.file.import.listNum = 7
9 < .1
9.2.file.import.listNum = 8
10 < .1
10.2.file.import.listNum = 9
}
The result will be:
<img src="xyz.jpg" width="200" height="100" />
This is perfect but now I additionally need to have the title attribute and alt attribute in the img tag like this:
<img src="xyz.jpg" width="200" height="100" title="image title" alt="alternative text" />
I tried things like that
resssourceimage.1.data = file:current:title
or
resssourceimage.1.2.data = file:current:title
but with the first one I got the page title not the title text I saved especially in relation to the ressource image file.
More information about the TYPO3-dev
mailing list