Question

I'd like to use photoswipe in typo3 Vers. 6.1, so I need to get as html something like this:

<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>

To get that I putted the pictures by using "Recources" on the page and I added the following typoscript-code:

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
 }

After that I get nearly, what I wanted, but the following html-output is not what I wanted:

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

So the variable {field:current:uid} isn't substituted by the filename. Does anybody have an idea?

Thank you very much!

Was it helpful?

Solution

try

typolink.parameter.data = ...

or

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

OTHER TIPS

Thank you for pointing me to the right direction Urs! In my constellation this is the right code:

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top