[TYPO3-english] Creating an XML for pageflipper per tt_news record

Bert Hiddink [BENDOO e-work solutions] hiddink at bendoo.com
Fri Apr 30 15:10:12 CEST 2010


Hello!

Please see the code below. I managed to create an XML file of the images 
per tt_news-record and then feed this XML into a page-flipper.
Works fine!

However, when I create the mark-up for an image, I need to add some 
additional info, besides the NAME of the image.

In particular, I need to pass the width and height of each image.
The needed output is:
               <page>
                <img src="uploads/pics/123.jpg" 
width="width_if_this_image" height="height_if_this_image" />
               </page>


I know this is stored in:
20 = TEXT
20.data = TSFE:lastImageInfo|0

and

20 = TEXT
20.data = TSFE:lastImageInfo|1

However, I do not see how I can do this. I tried:

xmlmegazine.30 = RECORDS
xmlmegazine.30 {
     dontCheckPid = 1
     tables = tt_news
     source.data = GPvar:tx_ttnews|tt_news
     conf.tt_news = TEXT
     conf.tt_news {
       field = image
        split {
            token=,
            cObjNum = 1
            1.current = 1
            1.dataWrap (
               <page>
          <img src="uploads/pics/|" width="{TSFE:lastImageInfo|0}" 
height="{TSFE:lastImageInfo|1}"/>
               </page>

             )
       }
     }
     conf.tt_news.required = 1
}


...but this returns an empty value:
  <book>
     <chapter>
<page>
          <img src="uploads/pics/Oranje_tray.jpg" width="" height=""/>
               </page><page>
          <img src="uploads/pics/lekkersnelfolder1_03.jpg" width="" 
height=""/>
               </page><page>
          <img src="uploads/pics/lekkersnelfolder2_02.jpg" width="" 
height=""/>

               </page><page>
          <img src="uploads/pics/lekkersnelfolder3_02.jpg" width="" 
height=""/>
               </page>
     </chapter>
</book>

Any ideas here?

Thanks in advance!!!!

Bert













More information about the TYPO3-english mailing list