2011-08-11 3 views
0

기본적으로 typelink 매개 변수 인 경우 기본적으로 borderContent를 cObject에 할당하는 방법을 알아야합니다.typolink의 cObject가 border-content로 지정되었습니다.

완전한 라이트 박스를 사용하고 있습니다. 텍스트를 클릭 할 때 라이트 박스를 열고 경계 섹션의 단일 컨텐츠 요소에있는 이미지를 표시하고 싶습니다. 잘 작동

page.20 = TEXT 
page.20.value = Open an image in a lightbox 
page.20.typolink { 
title = This is my caption 
parameter.cObject = IMG_RESOURCE 
parameter.cObject = fileadmin/image2.jpg 
parameter.cObject.file.maxW = 600 
parameter.cObject.file.maxH = 600 
ATagParams = rel="lightbox[mySet]" 
} 

: 설명서를 통해 찾고

, 난이 코드를 발견했다. 그러나 나는 경로가 어려운 설정이 아니라, 경계 구역에서로드 할 내용을 원한다. 그러나 다음을 시도해 보면 :

page.20 = TEXT 
page.20.value = Open an image in a lightbox 
page.20.typolink { 
title = This is my caption 
parameter.cObject = IMG_RESOURCE 
parameter.cObject < styles.content.getBorder 
parameter.cObject.file.maxW = 600 
parameter.cObject.file.maxH = 600 
ATagParams = rel="lightbox[mySet]" 
} 

링크가 없어졌습니다.

그래서 콘텐츠를 잘못 지정하고 있습니다. 누군가 대답을 알고 있니?

감사합니다.

(어떤 도움이, 내가 automaketemplate를 사용하는 경우 ..)

답변

2

styles.content.getBorder 그냥 국경 열에서 전체 콘텐츠 요소를 할당합니다 할당. 이것은 당신을 어디에도 데려 올 수 없습니다.

경계 요소에서 수동으로 내용 요소를로드해야합니다. 물론 이것은 TypoScript로 수행 할 수 있습니다. 다음과 같이되어야합니다.

page.20 = TEXT 
page.20 { 
    value = Open an image in a lightbox 
    typolink { 
     ATagParams = rel="lightbox[mySet]" 
     title = This will be the title attribute 
     parameter.cObject = CONTENT 
     parameter.cObject { 
      table = tt_content 
      select { 
       pidInList = this 
       where = colPos = 3 
      } 

      renderObj = IMG_RESOURCE 
      renderObj.file { 
       import = uploads/pics 
       import.field = image 
       import.listNum = 0 
       width = 600 
       height = 600 
      } 
     } 
    } 
} 

기본적으로 현재 페이지의 테두리 위치에있는 모든 콘텐츠 요소를로드합니다. 이미지 목록의 첫 번째 이미지를 렌더링하고 리소스를 반환합니다.

+0

고마워요! 그것은 올바른 방향으로 나를 가리켰다 :) – Nareille

+0

+1 for colPos = 3 – primo

관련 문제