2014-03-13 54 views
0

我想在typo3中使用photoswipe Vers。 6.1,所以我需要爲HTML這樣的:鏈接到typoscript中的imagefile

<ul id="Gallery" class="gallery"> 
<li><a href="fileadmin/images/mobile/Verschiedenes/full/DSC_0110.JPG" rel="external"><img src="fileadmin/images/mobile/Verschiedenes/thumbs/DSC_0110.JPG" alt="Image 01" /></a></li> 
<li><a href="fileadmin/images/mobile/Verschiedenes/full/DSC_0111.JPG" rel="external"><img src="fileadmin/images/mobile/Verschiedenes/thumbs/DSC_0111.JPG" alt="Image 02" /></a></li> 
</ul> 

要得到,我用「的recources」頁面上推杆的照片,我增加了以下Typo腳本代碼:

temp.pics = FILES 
temp.pics { 
    #folders = 1:thumbs/ 
     references { 
      table = pages 
      uid.data = tsfe:id 
      fieldName = media 
} 
renderObj = IMAGE 
renderObj { 
#file.import.data = file:current:originalUrl 
file.import.data = file:current:originalUid 
altText.data = file:current:title 
wrap = <li>|</li> 
imageLinkWrap = 1 
    imageLinkWrap { 
     # Activate ImageLinkWrap. 
     enable = 1 
     typolink.parameter = fileadmin/images/mobile/Verschiedenes/full/{field:current:uid} 

     } 
} 
stdWrap.wrap = <ul id="Gallery" class="gallery">|</ul> 
} 


page.10 { 
    template.file = fileadmin/templates/mobile/main_bilder.html 
    marks.BILDER < temp.pics 
} 

之後,我得到近,我想要的東西,但下面的HTML輸出是不是我想要的東西:

<a class="ui-link" href="fileadmin/images/mobile/Verschiedenes/full/{field:current:uid}"> 

所以變量{場:電流:UID}不是由文件名取代。有人有想法嗎?

非常感謝!

回答

1

嘗試

typolink.parameter.data = ... 

typolink.parameter = ... 
typolink.parameter.insertData = 1 
1

謝謝你指着我正確的方向烏爾斯!在我的星座中,這是正確的代碼:

temp.pics = FILES 
temp.pics { 
    references { 
    table = pages 
    uid.data = tsfe:id 
    fieldName = media 
    } 
    renderObj = IMAGE 
    renderObj { 
    file.import.data = file:current:originalUid 
    altText.data = file:current:title 
    wrap = <li>|</li> 
    imageLinkWrap = 1 
    imageLinkWrap { 
     # Activate ImageLinkWrap. 
     enable = 1 
     typolink.parameter = fileadmin/images/mobile/Verschiedenes/full/{file:current:name} 
     typolink.parameter.insertData = 1 
    } 
    } 
stdWrap.wrap = <ul id="Gallery" class="gallery">|</ul> 
} 



page.10.marks.BILDER < temp.pics