2012-12-03 2 views
1

누구나 현재 이미지 파일 이름을 어떻게 얻을 수 있는지 말해 줄 수 있습니다. 라이트 박스에서 열려면 현재 이미지를 링크해야합니다.현재 이미지에서 파일 이름 가져 오기

내 코드 : mainpulation을 IMG 동안 설정

15 = TEXT 
    15 { 
     field = image 
     split { 


     token = , 
     cObjNum = 1 || 3 || 3 


     //ignore 
     1.... 


     3 { 
      10 = IMAGE 
      10.file.import.current = 1 
      10.file.import = uploads/pics/ 
      10.file.maxW = 270 
      10.params = class="hidden" 

      10.imageLinkWrap = 1 
      10.imageLinkWrap { 
      enable = 1 
      typolink.parameter = TEXT 
      typolink.parameter.field = image 
      typolink.parameter.listNum.splitChar = , 

      typolink.parameter.listNum = // <- Need current image number 
      typolink.parameter.wrap = /uploads/pics/| 

답변

3

당신이해야 할 몇 가지 특별한 바르. TYPO3 위키에서 IMG_RESOURCE

: 는 TYPO3는 TSFE 설정하는 img_resource 렌더링하는 동안 : lastImgResourceInfo

TSFE:lastImgResourceInfo|0 contains the width (after scaling) of the image 
TSFE:lastImgResourceInfo|1 contains the height (after scaling) of the image 
TSFE:lastImgResourceInfo|2 contains the image file extension 
TSFE:lastImgResourceInfo|3 contains the path to the (scaled) image file 
TSFE:lastImgResourceInfo|origFile contains the name (path?) of the original file 
TSFE:lastImgResourceInfo|origFile_mtime contains the the last modification time of the original file 

그래서 당신이 데이터를 예를 들어 사용할 수 있습니다 이미지 정보의 숫자 배열입니다

10 = TEXT 
10.data = TSFE:lastImgResourceInfo|3 
+0

감사 어쨌든,하지만 난 나 자신 (+ 요리사)에 의해 다른 해결책을 발견했다. 여기 내 해결책은 다음과 같습니다. typolink.parameter.stdWrap.data = 등록 : SPLIT_COUNT – anguish

+0

사실 내 대답이 잘못되었습니다. 나는 너의 질문을 너무 빨리 읽었다. 나는 당신이 이미지 이름을 rescalled 필요하지만. 가장 좋은 점은 당신이 질문에 대한 별도의 대답을하고 내 대답이 삭제된다는 것입니다. – Krystian

0

http://wiki.typo3.org/TSref/stdWrap#current http://www.typo3wizard.com/de/snippets/general-config/bild-aus-media-feld.html

(210)

필드 "이미지"

lib.images=TEXT 
lib.images.data= levelmedia: 2,slide 
lib.images.wrap=<div id="bilder">|</div> 
lib.images.split{ 
token=, 
cObjNum=1 
1.10=IMAGE 
1.10.file{ 
import.current=1 
import=uploads/media/ 
width = 270 
height= 300 
} 
} 
관련 문제