[TYPO3-english] Creating an XML for pageflipper per tt_news record
Bert Hiddink [BENDOO e-work solutions]
hiddink at bendoo.com
Mon May 3 17:28:26 CEST 2010
Hello Peter!
Thanks for your reply and explaination:
On 5/1/10 12:36 AM, Peter Klein wrote:
> Hi Bert.
>
> TSFE:lastImageInfo| is only available AFTER you have processed an IMAGE
> object.
> If you change your TS, so that instead of using dataWrap, you create an
> IMAGE object, then it should work.
>
> If you just need to return the url and do the wrapping yourself, you can
> create an IMG_RESOURCE object.
> Then the width/height info is stored in TSFE:lastImgResourceInfo|
Thanks to your tip, I could get height and width out of
the object xmlmegazine.10.15, that is, when I define the PDF
in a static manner, these are printed under xmlmegazine.10.20
and xmlmegazine.10.30 respectively.
So far, so good.
However, I would like to get the height and width of the PDF which is
linked to a tt_news record (see xmlmegazine.10.10).
This works fine, that is, this TS-block gives me back the name of the
PDF-file
However, I do not manage to create an IMAGE-object or
IMG_RESOURCE-object out of the xmlmegazine.10.10.
I thought this may be simply done with:
15 = IMG_RESOURCE
15.file < 10
...but this did not work. Any ideas what I am doing wrong here?
Thanks in advance!!!
Bert
....
xmlmegazine.10 = COA
xmlmegazine.10 {
10 = RECORDS
10 {
dontCheckPid = 1
tables = tt_news
source.data = GPvar:tx_ttnews|tt_news
conf.tt_news = TEXT
conf.tt_news.field = image
conf.tt_news.required = 1
}
10.wrap = uploads/media/
# This works:
#15 = IMG_RESOURCE
#15.file = uploads/media/memoria_institucional_2009.pdf
# This does not works:
15 = IMG_RESOURCE
15.file < 10
20 = TEXT
20.data = TSFE:lastImgResourceInfo|0
20.noTrimWrap = | pageheight="|" |
30 = TEXT
30.data = TSFE:lastImgResourceInfo|1
30.noTrimWrap = | pagewidth="|"> <chapter>|
}
....
More information about the TYPO3-english
mailing list